XML/XPath: Difference between revisions

Line 126:
set xmlData to make new XML data with properties {name:"xmldata", text:theXMLdata}
return my getBlock(xmlData's text, "item", 1) -- Solution to part 1 of problem.
return my getElementValuesByName(xmlData's contents, "name") -- Solution to part 2 of problem.
return my getElementValuesByName(xmlData's contents, "price") -- Solution to part 3 of problem.
end tell</lang>Output for the three results (respectively):<lang AppleScript>"<item upc=\"123456789\" stock=\"12\">
Anonymous user