
Paths
The syntax for XML paths is similar to file paths. XML paths start from
the root of the document and list elements along the way. Elements are
separated by the “/” character.
The root of the document is “
/”. The root is a node that sits before the top-
level element. It represents the document as a whole.
The following four paths match respectively the title of the article
(<title>XML Style Sheets</title>), the keywords of the article, the top-
most article element, and all sections in the article. Note that the last path
matches several elements in the source tree.
/article/title
/article/keywords
/article
/article/section
TIP
Note that “/” points ...