XML/XPath: Difference between revisions

→‎{{header|Scala}}: Change second task to follow semantics of the original example
(Add XPaths corresponding to the original solution semantic)
(→‎{{header|Scala}}: Change second task to follow semantics of the original example)
Line 2,779:
</item>)
 
scala> xml \\ "price" map (_.text) foreach println
<price>14.50</price>
<price>23.99</price>
<price>4.95</price>
<price>3.56</price>
 
scala> val names = (xml \\ "name").toArray
Anonymous user