Re: XML Editing - set Value with System Events
Re: XML Editing - set Value with System Events
- Subject: Re: XML Editing - set Value with System Events
- From: Luther Fuller <email@hidden>
- Date: Mon, 09 Apr 2012 15:07:15 -0500
On Apr 9, 2012, at 2:02 PM, Doug McNutt wrote:
> You could try making the change with a text editor just to be sure everything works. You might even be able to record an AppleScript to do it.
If you can both READ(!) & WRITE(?) an .xml file with Property List Suite, then the preferred method is to:
1. Read the value of the file into an AppleScript record variable.
2. Modify this record to do what you need.
3. Write the record back into the file.
It's very easy to see the contents of a .plist file using Property List Editor or Xcode so you will know how to do step 2. (You do have to remember to "Show Raw Keys" and set Property List Type = None.) It's impossibly hard to understand the structure of the file by looking at XML TEXT.
Modifying an AppleScript record is usually very easy. (iTunes 'iTunes Music Library.xml' was an exception because it contained a record of numerically named records.)
_______________________________________________
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