PRB: MSXML 4.0: Matching Nodes Are Not Returned When You Run XPath Queries Against XML Documents that Specify a Default Namespace Declaration (313372)
The information in this article applies to:
This article was previously published under Q313372 SYMPTOMS
When you use the MSXML 4.0 Document Object Model (DOM) methods (selectNodes and selectSingleNode) to run XPath queries against an XML document that specifies a default namespace declaration, the matching node or nodes are not returned.
CAUSE
The default namespace declaration is not added to the Namespace names of the DOMDocument object, or a namespace prefix is not specified for the default namespace declaration when it is added to the Namespace names of the DOMDocument object.
RESOLUTION
Add the default namespace declaration to the Namespace names of the DOMDocument object by specifying a namespace prefix. To do this, use the setProperty method of the DOMDocument object to set the SelectionNamespaces internal property.
STATUS
This behavior is by design.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
288913 HOWTO: Use XPath Queries in MSXML DOM selectNodes Method
Modification Type: | Minor | Last Reviewed: | 9/26/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbprb KB313372 kbAudDeveloper |
---|
|