XML/XPath: Difference between revisions

Content deleted Content added
→‎{{header|Scala}}: Replace with code that follow XPath semantics and the problem description more closely
Add XPaths corresponding to the original solution semantic
Line 2:
 
Perform the following three XPath queries on the XML Document below:
* '''//item[1]''': Retrieve the first "item" element
* '''//price/text()''': Perform an action on each "price" element (print it out)
* '''//name''': Get an array of all the "name" elements
 
XML Document: