15.
Accessing individual locations in location set
This tutorial is obsolete. Please, use the
new one.
Description
Similarly to accessing nodes in XPath's node-sets,
the individual locations in XPointer's location-sets
can be accessed using square brackets [ ].
Node-type locations
XPointer: xpointer(//AAA/BBB[2])
<AAA> <BBB bbb="111"> Text in the first element BBB.</BBB> <BBB bbb="222"> Text in another element BBB. <DDD ddd="999"> Text in more nested element.</DDD> </BBB> <CCC ccc="123" xxx="321"> Again some text in some element.</CCC> </AAA>
<AAA> <BBB bbb="111"> Text in the first element BBB.</BBB> <BBB bbb="222"> Text in another element BBB. <DDD ddd="999"> Text in more nested element.</DDD> </BBB> <CCC ccc="123" xxx="321"> Again some text in some element.</CCC> </AAA>