XML Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 4.00

XPath (XML Path) Language

This chapter provides tutorial notes and example codes on XPath (XML Path). Topics include introduction of XPath (XML Path); datatypes: Boolean, number, string and node set; evaluation context; expression and location path; using XPath in XSLT.

What is XPath (XML Path)?

Data Types, Literals and Variables

Evaluation Context

Built-in Functions

Expressions and Location Paths

Using XPath in XSLT Templates

Conclusion:

  • XPath supports 4 datatypes: Boolean, number, string, and node set.
  • XPath expressions are always evaluated under a dynamic context.
  • XPath expressions are used in XSLT templates to match or select node sets in the source XML document.
  • XPath expressions are also used in XSLT "value-of" elements to produces a string.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating an XML Document against the Specified XML Schema

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 References

 Printable Copy - PDF Version

Dr. Herong Yang, updated in 2009
XPath (XML Path) Language