• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XML Editing - set Value with System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >XML Editing - set Value with System Events (From: "email@hidden" <email@hidden>)
 >Re: XML Editing - set Value with System Events (From: Luther Fuller <email@hidden>)
 >Re: XML Editing - set Value with System Events (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: XML Editing - set Value with System Events
  • Next by Date: Re: AppleScript-Users Digest, Vol 9, Issue 149
  • Previous by thread: Re: XML Editing - set Value with System Events
  • Next by thread: Re: AppleScript-Users Digest, Vol 9, Issue 149
  • Index(es):
    • Date
    • Thread