fredmartinmaine
IS-IT--Management
I'm trying to create a new XML doc; for the moment just the root element. I'd like the output to look like this:
<ImportInspectionsRequest xmlns="<ImportInspectionsRequest>
Here's the code:
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
Set objRoot = xmlDoc.createElement("ImportInspectionsRequest")
objRoot.SetAttribute "xmlns","xmlDoc.appendChild objRoot
xmlDoc.Save "test.xml"
The script runs without error. The xml is is created and has the node, but no attribute.
Any idea why not? SetAttribute must have done something or it would have squawked.
Apparently not related to being the root element. Same happens elsewhere, several levels in.
Fred
<ImportInspectionsRequest xmlns="<ImportInspectionsRequest>
Here's the code:
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
Set objRoot = xmlDoc.createElement("ImportInspectionsRequest")
objRoot.SetAttribute "xmlns","xmlDoc.appendChild objRoot
xmlDoc.Save "test.xml"
The script runs without error. The xml is is created and has the node, but no attribute.
Any idea why not? SetAttribute must have done something or it would have squawked.
Apparently not related to being the root element. Same happens elsewhere, several levels in.
Fred