4. XPath PB138 XPath ● //person ● descendant-or-self:person ● /descendant-or-self:person ● child::people/child::person Shortcuts ● attribute:: -> @ ● descendant-or-self -> // find last element in third level of XML tree of the document (nodetest *) XPath predicates ● AXIS::NODETEST[predicate] ○ position()=1 ○ position=last() ○ you can use or, and ● find full_address of Steven Segal ● find phones of Jirka Novák and Segal ● Find name of the Person living on street 'Uvoz 22' Node sets and Union ● count(nodeset) counts number of nodes ● nodeset | nodeset creates union of nodesets ● count number of phone elements and person elements together ● number of phones that contain number sequence "77" use contains(string, string)