December 2003
Intermediate to advanced
384 pages
7h 10m
English
IN THIS CHAPTER
The main purpose of XPath is to make it easy to work with the data in an XML document. XPath lets you address specific parts of XML documents.
Let's begin with an example to demonstrate the reason to use XPath. Say, for example, that you have an XML document, ch01_01.xml, that stores information about various planets in three <planet> elements, as you see in Listing 1.1.
Example 1.1. A Sample XML Document (ch01_01.xml)
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="ch01_02.xsl"?> <planets> <planet> <name>Mercury</name> ...
Read now
Unlock full access