PRB: MSXML 4.0 Sets the XML Namespace Attribute to an Empty Value for Child Nodes (828928)
The information in this article applies to:
- Microsoft XML 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
SYMPTOMSWhen you add the XML namespace attribute (xmlns) to the root node of an XML document, an XML namespace attribute
with an empty value is created for the child nodes of the root
node.CAUSEYou cannot add, modify, or
delete an XML namespace definition in an instance of an XML document after the document has been loaded
into the XML Document Object Model (XMLDOM) parser. The XML nodes that are used to represent data in the XML
document are created when the document is loaded into the XMLDOM parser. These
nodes are permanently bound to their XML namespace attributes when they are
created. Therefore, the empty XML namespace declaration (xmlns = "") is
appended to the child nodes of these nodes to preserve the default XML
namespace attribute of these nodes.WORKAROUNDTo work around this problem, specify XML namespace
declarations before you load an XML document.STATUS This
behavior is by design.REFERENCES For additional information, click the following article
number to view the article in the Microsoft Knowledge Base: 290485
DOMDocument.CreateNode() Method Appends an Empty Namespace Declaration
For more information about XML namespaces, visit
the following W3C Web site:
Modification Type: | Minor | Last Reviewed: | 8/18/2005 |
---|
Keywords: | kbNameSpace kbXML kbprb KB828928 kbAudDeveloper |
---|
|