XML parsing (in 1 line)
XML parsing (in 1 line)
- Subject: XML parsing (in 1 line)
- From: "Michiel (werk)" <email@hidden>
- Date: Tue, 30 Jul 2002 13:45:43 +0200
When I parse a XML file (using the XML tools) I know how to get the
information by a repeat-loop.
Something like this:
-------
set theXML to parse XML (read file (theFile))
repeat with anItem in XML contents of theXML
repeat with aSubItem in XML contents of anItem
if XML tag of aSubItem is "place" then set de_place to XML contents of
aSubItem
if XML tag of aSubItem is "street" then set de_street to XML contents of
aSubItem
end repeat
repeat
------------
This works very good (so this isn't the problem)
THE PROBLEM:
I want to get only the 'place' information without a repeatloop.
Something like:
set theXML to parse XML (read file (theFile))
set qq to every XML tag 'place' of XML element of XML contents of theXML
This line doesn't work.
Can someone tell if (and how?) it IS possible??
BTW: I made a Facespan application to get information from a XMl-file and
put it into QuarkXpress. If someone is interested he can get this.
Michiel de Leeuw van Weenen
The Netherlands
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.