So What has Changed for Paths in XPath 2.0?
Nodes can be selected by type as well as name
//entry/element()
- In XPath 1.0, type is usually implicit (except
comment() and processing-instruction())
- child::element() is the same as
child::*
- But element() has other uses
(e.g.
type-checking when defining functions)
Any expression can be used as a step
//entry/(project|work)/*
//entry/*/name()
- If not the final step, must return a sequence of nodes
(or an
error is returned)