--- title: "Sample XPath Queries (SQLXML 4.0) | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: xml 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 author: MightyPen ms.author: genemi manager: craigg --- # 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)](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)](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)](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)](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)](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)](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)](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)](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)](specifying-xpath-variables-in-xpath-queries-sqlxml-4-0.md) Illustrates how XPath variables are specified in XPath queries.