XQuery Path Expressions


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"]	 

Find captions of figures that are referenced by <figref> elements in the chapter of "zoo.xml" with title "Frogs".

	document("zoo.xml")/chapter[title = "Frogs"]//figref/@refid=>fig/caption