• 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: julifos <email@hidden>
  • Date: Tue, 12 Aug 2003 10:00:41 +0200

> At 23:16 +0200 8/11/03, Jean-Baptiste LE STANG wrote:
>> have a look at 'defaults' , that will help you to modify easily '.plist'
>> files
>
> Which was one of the tools I had looked at, but
> could not figure out how to get it to edit the
> /var/db/SystemConfiguration/preferences.xml file.
> Defaults would only modify local (~/library)
> files in my attempts.
> This certainly appeared to be the correct way to
> modify the file, but... If this is possible,
> please show me.

I don't know if this was stated before...

Maybe it's an *extension* problem; you can edit a *valid* plist, but not a
xml. So, you can duplicate the file, work with it, then rename back the
plist to xml.

#########################################
set renameXML2Plist to "mv /var/db/SystemConfiguration/preferences.xml
/var/db/SystemConfiguration/preferences.plist;"
set modifyPlistFile to "defaults read
/var/db/SystemConfiguration/preferences CurrentSet;"
set renamePlist2XML to "mv /var/db/SystemConfiguration/preferences.plist
/var/db/SystemConfiguration/preferences.xml;"

do shell script renameXML2Plist password "pwd" with administrator privileges
do shell script modifyPlistFile password "pwd" with administrator privileges
do shell script renamePlist2XML password "pwd" with administrator privileges
#########################################

jj
_______________________________________________
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.

  • Follow-Ups:
    • Re: modify xml file
      • From: Jeramey Valley <email@hidden>
  • Prev by Date: Re: modify xml file
  • Next by Date: Digest request
  • Previous by thread: Re: Send mail using AppleScript (almost)
  • Next by thread: Re: modify xml file
  • Index(es):
    • Date
    • Thread