Re: modify xml file
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.