Re: How to work with XML data using System Events?
Re: How to work with XML data using System Events?
- Subject: Re: How to work with XML data using System Events?
- From: pete boardman <email@hidden>
- Date: Fri, 4 Nov 2005 14:14:13 +0000
On 4 Nov 2005, at 13:47, Matt Neuburg wrote:
Example (from you-know-where):
no, where?
tell application "System Profiler"
set s to (XML text of document 1)
end tell
on findElementWithValue(e, v)
tell application "System Events"
repeat with i from 1 to (count XML elements of e)
if value of XML element i of e is v then
return i
end if
end repeat
end tell
error "not found"
end findElementWithValue
tell application "System Events"
set x to make new XML data with data s
set e to XML element 1 of XML element 1 of x
get XML element 1 of XML element 1 of «class id 1
--> "System Events got an error: Can't make XML element 1 of XML
element 1 of «class id 1 into type reference."
but I take your point! Will spend another half hour on it.
thanks
Pete _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden