Working with Namespaces
MSXML provides full support for XML namespaces. Because the World Wide Web Consortium (W3C) Namespaces in XML Recommendation appeared after the DOM Level 1 was complete, namespace support in the MSXML DOM is provided through extensions to the core DOM model. Namespace support properties are provided for all nodes in the DOM, but are generally meaningful only for element and attribute nodes. For more information, see Using Namespaces in Documents.
The name
property of a node is its qualified name, including the namespace prefix, if any. If you want just the namespace prefix, the prefix
property includes that information, while the base name, leaving off the prefix, is available through the baseName
property. The namespace URI to which the prefix refers is available through the namespaceURI
property.
To create namespace declarations, you must create attributes beginning with xmlns
as defined by the Namespaces in XML specification.