Re: Lists to XML ?
Re: Lists to XML ?
- Subject: Re: Lists to XML ?
- From: Shane Stanley <email@hidden>
- Date: Sat, 25 Mar 2017 12:53:23 +1100
On 25 Mar 2017, at 12:41 pm, Jean-Christophe Helary <email@hidden> wrote:
If I want to write to a file, what's the difference between XMLString and XMLData ?
If you get a string, you then have to write it to a file as UTF-8. If you just write the data, you skip the conversions back and forth. It's just more efficient.
Is it possible to have the data nicely printed out with XMLData as in what you just proposed ?
Sure:
set theData to theXMLDocument's XMLDataWithOptions:((current application's NSXMLDocumentTidyXML) + (get current application's NSXMLNodePrettyPrint)) theData's writeToFile:"/users/shane/Desktop/Test.xml" atomically:true
|
_______________________________________________
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