Anonymous user
XML/XPath: Difference between revisions
→{{header|AppleScript}}
Line 127:
return my getBlock(xmlData's text, "item", 1)
return my getElementValuesByName(xmlData's contents, "name")
--> {"Invisibility Cream", "Levitation Salve", "Blork and Freen Instameal", "Grob winglets"}▼
return my getElementValuesByName(xmlData's contents, "price")
--> {"14.50", "23.99", "4.95", "3.56"}▼
end tell</lang>Output for the three 'return' commands is (respectively):<lang AppleScript>"<item upc=\"123456789\" stock=\"12\">
<name>Invisibility Cream</name>
<price>14.50</price>
<description>Makes you invisible</description>
</item>"
=={{header|C sharp}}==
|