1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
9
namespace ICSharpCode.WixBinding
11
public abstract class WixElementBase : XmlElement
13
public WixElementBase(string localName, WixDocument document)
14
: base(document.GetWixNamespacePrefix(), localName, WixNamespaceManager.Namespace, document)
19
get { return GetAttribute("Id"); }
20
set { SetAttribute("Id", value); }
23
public string GetXml(WixTextWriter wixWriter)
25
StringBuilder xml = new StringBuilder();
26
StringWriter stringWriter = new StringWriter(xml);
27
using (XmlWriter xmlWriter = wixWriter.Create(stringWriter)) {
30
return RemoveWixNamespace(xml.ToString());
33
string RemoveWixNamespace(string xml)
35
string namespaceDeclaration = String.Concat(" xmlns=\"", WixNamespaceManager.Namespace, "\"");
36
return xml.Replace(namespaceDeclaration, String.Empty);
39
protected WixDocument OwnerWixDocument {
40
get { return (WixDocument)OwnerDocument; }