I want to create a node as follows using MSXML DOM ( MsXml6.h )
<name xmlns:a="http://example.com/a" xmlns:b="http://example.com/b" xmlns:c="http://example.com/c>
<child>child content</child>
....
</name>
MsXML DOM allows to add one namespace of the prefix using createNode()
but how to add extra namespaces? setProperty()
seems to be little different.
Should I use createAttribute()
as a hack? Is it okay? Or any better approach?
Well no one ever answered this. So I'm giving my own solution here. May be helps someone some time.
Instead of adding an exact namespace, we can add an attribute like:
xmlns:ns="http://example.com/path/to/whatever"
Where attribute name is xmlns:ns
and value being http://example.com/path/to/whatever
And add this! Done.