D
Dylan Parry
Hi,
If I create an XML document using:
XmlDocument xmldoc = new XmlDocument();
And I start load in some XML using:
xmldoc.LoadXml("<root
xmlns:ldf=\"http://www.govtalk.gov.uk/planning/LDF-200603\"
xmlns:xhtml=\"http://www.w3.org/1999/xhtml\"></root>");
Then start creating and appending new nodes to the root element, eg.
<ldf:Element>. When I output "xmldoc.FirstElement.InnerXml", most of the
prefixes (ldf:, and xhtml have disappeared from the code, and in some
cases, the xmlns:xhtml="..." attribute has been liberally scattered
throughout the XML string.
Is there any way I can a) retain *all* the prefixes that I specified,
and b) stop the addition of xmlns:xhtml attributes from occurring?
Thanks,
If I create an XML document using:
XmlDocument xmldoc = new XmlDocument();
And I start load in some XML using:
xmldoc.LoadXml("<root
xmlns:ldf=\"http://www.govtalk.gov.uk/planning/LDF-200603\"
xmlns:xhtml=\"http://www.w3.org/1999/xhtml\"></root>");
Then start creating and appending new nodes to the root element, eg.
<ldf:Element>. When I output "xmldoc.FirstElement.InnerXml", most of the
prefixes (ldf:, and xhtml have disappeared from the code, and in some
cases, the xmlns:xhtml="..." attribute has been liberally scattered
throughout the XML string.
Is there any way I can a) retain *all* the prefixes that I specified,
and b) stop the addition of xmlns:xhtml attributes from occurring?
Thanks,