PRB: Specifying Fully Qualified Element Names in XPath Queries (280457)
The information in this article applies to:
- Microsoft XML 3.0
- Microsoft XML 3.0 SP1
- Microsoft XML 4.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q280457 SYMPTOMS
Specifying an XPath query as the query string parameter in a call to the selectNodes or selectSingleNode MSXML DOM methods may generate the following error message when the query includes one or more fully qualified element names in the NamespacePrefix:ElementName format:
Run-time error '-2147467259(80004005)': Reference to undeclared namespace prefix : '<Namespace Prefix>'
CAUSE
The SelectionNamespaces property of the MSXML DOMDocument object has not been set to specify the namespaces that are used in the XML document.
RESOLUTION
Use the SetProperty method of the MSXML DOMDocument object to set its SelectionNamespaces property and specify the namespaces to be used in the XML document.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/12/2001 |
---|
Keywords: | kbprb KB280457 |
---|
|