Harald wrote:
Quote:
root xmlns="anyURI"
child 1>My Text</child 1
..
But when generation the XLM, the nodes look like that:
root xmlns="anyURI"
child 1 xmlns="">My Text</child 1
How can I suppress the xmlns="" in child 1 ??? |
You need to create each element in the namespace it belongs to
Quote:
XmlElement root = _doc.CreateElement("Root", "anyURI");
root.AppendChild(_doc.CreateElement("child 1")).InnerText = "My Text"; |
ropt.AppendChild(_doc.CreateElement("child_1", "anyURI"))
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/