NeilL wrote:
What I want it to use is the default for the document. So how would that be
specified... by useing the DocumentElement.NamespaceURI ?
Does your Document use no Namespaces? Like:
<root>
<elem>
<Author>Joe</Author>
</elem>
</root>
If you just never use the "Namespaced"-Overloads of CreateElement, you
will get this Document.
If you don't specify explicit prefixes (using CreateElement-Overloads)
your document may look like this:
<root> <!-- empty xmlns -->
<elem xmlns="foo">
<bar /> <!-- foo is in xmlns "foo" -->
<Author xmlns="">Joe</Author>
</elem>
</root>
But if you specify prefixes it looks like this:
<root> <!-- empty xmlns -->
<a:elem xmlns:a="foo">
<bar /> <!-- empty xmlns -->
<Author>Joe</Author>
</a:elem>
</root>
Xml Namespaces are "inherited" through the structure, see
<http://www.w3.org/TR/REC-xml-names/#scoping-defaulting>
--
Pascal Schmitt