Executing XPath Queries with Namespaces
SQL Server 2000
Previously, in Microsoft® SQL Server™ 2000, you could execute XPath queries with namespaces only by specifying the XPath query in a template. In Microsoft SQLXML 3.0:
- You can specify XPath queries with namespaces against mapping schemas in the URL. In this case, the namespaces parameter must be specified in the URL in order to specify the namespace binding that will resolve the prefix. For example:
http://localhost/nwind/schema/SampleSchema.xml/x:Employee?namespaces=xmlns:x='urn:myschema:Employees'&root=rootIn this URL, x:Employee is the XPath query that is executed against the mapping schema (SampleSchema.xml). The namespaces parameter provides the binding to resolve the prefix.
For more information, see Executing XPath Queries with Namespaces in the URL.
Note that you can specify multiple values separated by spaces for namespaces in the URL.
- You can execute XPath queries with namespaces by using the SQLXMLOLEDB Provider. A provider-specific property, namespaces, allows you to provide binding to resolve the prefix.
For more information, see Executing XPath Queries with Namespaces (SQLXMLOLEDB Provider).
