XML default namespaces and createNode method

admin

Administrator
Staff member
Hello all,I am wondering if I am reading the documentation for createNode incorrectlyor if there is an error in its implementation (in MSXML 3.0 and 4.0, usingVB). In particular:When I create a node using createNode(NODE_ELEMENT, "nodename", ""), I believethe node is supposed to be created in the default namespace (one aprt ofthe documentation reads "special namespace"...whatever that means).However, if I have a document with a defined default namespace and I addthe node to that document, the node becomes <nodename xmlns=""/>. This overridesthe default namespace and uses the empty string as a namespace instead...obviously this isn't acceptable. Does anyone have any idea what's goingon 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 namespaceis declared. I would like to load the document and then append its elementsto 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,Eric NicholsSoftware EngineerIntelliChem, Inc.20310 Empire Avenue, Suite A-102Bend, Oregon 97701 USAPhone: (541) <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> (email)http://www.IntelliChem.com (web)
 
Back
Top