(Q1) In the second chapter of the document named "zoo.xml", find the figure(s) with caption "Tree Frogs".

document("zoo.xml")/chapter[2]//figure[caption = "Tree Frogs"]
  • uses the "abbreviated syntax of XPath"; no ancestor, preceding, etc.
  • borrows the document() function from XSLT
  • result of a path expression is a deep copy of selected nodes
<<<  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15    >>>