Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 3
    Like the accepted answer, this answer relates only to XPath 1.0. The situation with XPath 2.0 (released 2007) and later versions is different. Commented Jul 22, 2021 at 16:58
  • Right, this answer pertains to XPath 1.0. See my modern (2022) answer that explains how XPath 2.0 and later behave differently. Commented Aug 31, 2022 at 11:55