XPointer - ukázka (2)

Xpointer výraz b2/3 nebo xpointer(id('b2')/*[3]) vybere z následujícího dokumentu

<AAA>
   <BBB myid="b1" bbb="111"> Text in the first element BBB.</BBB>
   <BBB myid="b2" bbb="222"> 
      Text in another element BBB. 
      <DDD ddd="999"> Text in more nested element.</DDD> 
      <DDD ddd="888"> Text in more nested element.</DDD> 
      <DDD ddd="777"> Text in more nested element.</DDD> 
   </BBB>
   <CCC ccc="123" xxx="321"> Again some text in some element.</CCC>
</AAA> 

...třetí uzel DDD ddd="777"...