Re: XML - System Events vs XMLlib
Re: XML - System Events vs XMLlib
- Subject: Re: XML - System Events vs XMLlib
- From: Bruce Robertson <email@hidden>
- Date: Thu, 30 Aug 2007 12:39:34 -0700
> On 30 Aug 2007, at 14:47, Wayne Melrose wrote:
>
>> Thanks fo the reply.
>
> No problem.
>
>
>> Just out of curiosity though, I have the xml as a stored variable
>> (it was never a text file as it is not actually a plist but xml in
>> the form of a plist.) is there a way to "tell contents of VAR_name"?
>
> tell application "System Events"
> -- make new plist item
> set plist to make new property list item with data "<?xml version=
> \"1.0\" encoding=\"UTF-8\"?>
> <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"
> \"http:// www.apple.com/DTDs/PropertyList-1.0.dtd\">
> <plist version=\"1.0\">
> <dict>
> <key>keyname</key>
> <integer>8</integer>
> <key>creation</key>
> <string>2007:06:12 20:13:52</string>
> <key>happy</key>
> <false/>
> </dict>
> </plist>
> "
> -- do stuff with it, e.g.
> set val to properties of property list items of plist
> -- dispose plist item when done
> delete plist
> end tell
> val
> --> {{kind:boolean, name:"happy", class:property list item,
> value:false},
> {kind:string, name:"creation", class:property list item,
> value:"2007:06:12 20:13:52"},
> {kind:number, name:"keyname", class:property list item, value:8}}
Since no file was defined, "where" is this property list item? If it is
simply an applescript variable why do we need to delete it?
Also what is «class seld» ? It does not appear to be a writable property.
set pl to plist as record
pl
--> {«class form»:named, «class want»:property list item, «class
seld»:"untitled 7", from:application "System Events"}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden