I am using MSXML 4 to generate the following xml string:
<?xml version="1.0">
<Parent_Element xmlns="http://1">
<Child_One>
<Child_Two xmlns="http://2">
<Child_Three>
</Child_Three>
</Child_Two>
</Child_One>
</Parent>
However the output from my IXMLDOMDocument2Ptr always includes a namespace for Child_Three:
<?xml version="1.0">
<Parent_Element xmlns="http://1">
<Child_One>
<Child_Two xmlns="http://2">
<Child_Three xmlns="http://1">
</Child_Three>
</Child_Two>
</Child_One>
</Parent>
My understanding is that this behavior is part of the XML standard, but the system receiving the xml rejects it if the extra namespace is present. It will also reject the xml if there is an empty namespace (i.e. xmlns="").
Is there anyway in MSXML to avoid adding or removing the namespace for Child_Three?