Multiple XML items

I have been using Bruce Phillips XML code:

set xmlFile to (choose file) as Unicode text

tell application "System Events"
	set titleValue to value of XML element "title" of XML element "channel" of XML element "rss" of contents of XML file xmlFile
	display dialog "the title is " & titleValue
end tell

.to parse xml, but how do I parse items with multiple entries? For example: How can I read all items of object1 into an array?


1
2
3

1

I am new to applescript and appreciate any help you can give me!

If this is for use on your own machine, you might try LateNightSoftware’s XML tools Scripting Addition

Try something like this:

choose file without invisibles
set xmlFile to result as Unicode text

tell application "System Events"
	tell XML element 1 of contents of XML file xmlFile -- <xml></xml>
		-- First element whose name is "objectA". You could also use XML element 1
		tell XML element "objectA" to set myList to value of XML elements
	end tell
end tell

:smiley: Excellent! Just what I needed, Bruce. Thank you