Chapter 3. Location Steps and Paths

Understanding Location Steps and Paths

How do location paths work? We took a look at location paths in the overview in Chapter 1, where we saw that location paths look much like directory paths. For example, you might store section one of chapter one of part one of a novel in a directory with this path if you're using Windows:

\novel\part1\section1\chapter1

or this path if you're using Unix:

/novel/part1/section1/chapter1

The idea behind XPath location paths is very much the same except that, as we'll see in this chapter and the next, the XPath syntax can get much more complex and detailed than directory ...

Get XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start 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.