XML default namespaces and createNode method
I am wondering if I am reading the documentation for createNode incorrectly
or if there is an error in its implementation (in MSXML 3.0 and 4.0, using
VB). In particular:
When I create a node using createNode(NODE_ELEMENT, "nodename", ""), I believe
the node is supposed to be created in the default namespace (one aprt of
the documentation reads "special namespace"...whatever that means).
However, if I have a document with a defined default namespace and I add
the node to that document, the node becomes <nodename xmlns=""/>. This overrides
the default namespace and uses the empty string as a namespace instead...
obviously this isn't acceptable. Does anyone have any idea what's going
on here? Is this a problem with the createNode implementation?
I have a similar problem if I use loadXML to generate a document from a string...
I have a string where the elements are all unqualified and no default namespace
is declared. I would like to load the document and then append its elements
to another document which does have a default namespace declared. However,
when I do this the appended elements get set to the null namespace with xmlns="",
just as happened above with createNode.
I would greatly appreciate any insight/discussion into these matters.
Thanks for any advice,
20310 Empire Avenue, Suite A-102
Bend, Oregon 97701 USA
Phone: (541) 382-7043
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center