I have the following code:
XmlElement parent= m_xmlDoc.CreateElement("parent", "http://tempuri.org/myns");
parent.InnerXml = "<child1>text</child1><child2>text</child2>";
"http://tempuri.org/myns" is declared as the default namespace for this xml file.
When I set InnerXml above, each <child> node gets the following extra attribute: xmlns="". I'd like child nodes to inherit the default namespace instead of the empty namespace. How can I do it?
thanks,
Zhenya
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>RbJaD+v5AESOPlKWfTXI8g==</Id>