• 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: modify xml file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modify xml file


  • Subject: Re: modify xml file
  • From: John Delacour <email@hidden>
  • Date: Tue, 12 Aug 2003 22:30:18 +0100

At 4:31 pm -0500 11/8/03, David Durkee wrote:

I'm not sure I understood everything, but it looks possible. You might not even need BBEdit. AppleScript itself is pretty good at handling files and text, there are scripting additions (open for access, read, close access) that can read in the files. You'd need to experiment to find the best way to parse the text, but Applescript could load the entire contents of the file into a variable like this:

set fileref to open for access afile
set plist to read fileref as text
close access fileref

a) xml files are in Unicode; b) it's not necessary to open the file for access

set _prefs to "" & (path to "cusr") & "Library:Preferences:"
set f to _prefs & "com.apple.systempreferences.plist" as file specification
-->file "dxp:Users:jd:Library:Preferences:com.apple.systempre#97DCD.plist"
(* interesting! *)
read f

JD



.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: modify xml file (From: David Durkee <email@hidden>)

  • Prev by Date: Re: Mail scripting
  • Next by Date: Re:
  • Previous by thread: Re: modify xml file
  • Next by thread: Re: modify xml file
  • Index(es):
    • Date
    • Thread