Re: Lists to XML ?
Re: Lists to XML ?
- Subject: Re: Lists to XML ?
- From: Shane Stanley <email@hidden>
- Date: Sat, 25 Mar 2017 23:15:22 +1100
On 25 Mar 2017, at 10:51 pm, Jean-Christophe Helary <email@hidden> wrote:
Basically the whole thing looks like that:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE tmx PUBLIC "-//LISA OSCAR:1998//DTD for Translation Memory eXchange//EN" "tmx14.dtd" > <tmx version="1.4">
This gets you close:
use framework "Foundation" use scripting additions
set theDTD to current application's NSXMLDTD's new() theDTD's setPublicID:"-//LISA OSCAR:1998//DTD for Translation Memory eXchange//EN" theDTD's setSystemID:"tmx14.dtd" set theDoc to current application's NSXMLDocument's new() theDoc's setDTD:theDTD return theDoc
But it's missing the tmx.
In the absence of something better, you can keep a valid existing document, read it as an XMLDocument (alloc()'s initWithContentsOfURL:options:error:), get its DTD(), and then setDTD: of the new document to the result. |
_______________________________________________
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