Creating an XmlElement without a namespace



I am using the CreateElement() method of my XmlDocument like this:



XmlElement jobElement = dom.CreateElement("job");


But what I get in the outcome is a job element with an empty namespace.



<job xmlns="">xyz</job>


And the program that is supposed to read this Xml will no longer detect this job element. I thought this question gives an answer, but it does not. How can I create a pure job element?



<job>xyz</job>

No comments:

Post a Comment