How XPath Is Used

XPath is written in a non-XML syntax that enables you to define which part or parts of an XML document are selected by an XML processor or an application built on it. For example, you might want to select information to include in a company report from elements in a data store representing sales during a specified period.

Understanding basic XPath syntax is essential to being able to use Extensible Stylesheet Language Transformations (XSLT), described in Chapter 10, “XSLT—Creating HTML from XML”; Chapter 11, “XSLT—Transforming XML Structure”; and Chapter 12, “XSLT—Sorting XML.”

Note

The description of XPath in this chapter ...

Get Sams Teach Yourself XML in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.