--- title: "Sample XPath Queries (SQLXML 4.0) | Microsoft Docs" ms.custom: "" ms.date: "03/17/2017" ms.prod: "sql-server-2016" ms.reviewer: "" ms.suite: "" ms.technology: - "dbe-xml" ms.tgt_pltfrm: "" ms.topic: "reference" helpviewer_keywords: - "examples [SQLXML], XPath" - "sample applications [SQLXML]" - "sample XPath queries [SQLXML]" - "mapping schema [SQLXML], queries" - "XPath queries [SQLXML], samples" ms.assetid: 1595c2d4-0e9c-4969-84c8-a793a32df57d caps.latest.revision: 24 author: "douglaslMS" ms.author: "douglasl" manager: "jhubbard" --- # Sample XPath Queries (SQLXML 4.0) This section provides examples of XPath queries for SQLXML 4.0. For illustration purposes, these example XPath queries are specified in a template executed using ADO. Therefore, you must use a mapping schema file, SampleSchema1.xml, which is also provided in this section. Save this file in the directory where your templates are stored. > [!NOTE] > The sample queries in this section are grouped by the type of XPath operation that is performed by the query. ## In This Section [Sample Annotated XSD Schema for XPath Examples (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/sample-annotated-xsd-schema-for-xpath-examples-sqlxml-4-0.md) Use this file with the XPath query examples provided in this section. [Specifying Axes in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-axes-in-xpath-queries-sqlxml-4-0.md) Illustrates how axes are specified in XPath queries. [Specifying Boolean-Valued Predicates in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-boolean-valued-predicates-in-xpath-queries-sqlxml-4-0.md) Illustrates how Boolean-valued predicates are specified in XPath queries. [Specifying Relational Operators in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-relational-operators-in-xpath-queries-sqlxml-4-0.md) Illustrates how relational operators are specified in XPath queries. [Specifying Arithmetic Operators in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-arithmetic-operators-in-xpath-queries-sqlxml-4-0.md) Illustrates how arithmetic operators are specified in XPath queries. [Specifying Explicit Conversion Functions in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-explicit-conversion-functions-in-xpath-queries-sqlxml-4-0.md) Illustrates how explicit conversion functions are specified in XPath queries. [Specifying Boolean Operators in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-boolean-operators-in-xpath-queries-sqlxml-4-0.md) Illustrates how Boolean operators are specified in XPath queries. [Specifying Boolean Functions in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-boolean-functions-in-xpath-queries-sqlxml-4-0.md) Illustrates how Boolean functions are specified in XPath queries. [Specifying XPath Variables in XPath Queries (SQLXML 4.0)](../../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/samples/specifying-xpath-variables-in-xpath-queries-sqlxml-4-0.md) Illustrates how XPath variables are specified in XPath queries.