Re: Working with XML...
Re: Working with XML...
- Subject: Re: Working with XML...
- From: Takaaki Naganoya <email@hidden>
- Date: Tue, 19 Dec 2017 14:07:00 +0900
> 2017/12/18 14:05、Jean-Christophe Helary
> <email@hidden>のメール:
>
> It looks like System Events has problems with big XML files...
>
> When I try
>
> tell application "System Events"
> return XML elements of contents of XML file XMLfile
> end tell
>
> of a small xml file, I get all the info I need. When I do that on a big file
> (125mb here), which is otherwise a valid XML document, I get this:
>
> "System Events got an error: Some data was the wrong type." which highlights
> "XML elements" in SD and suggests that it is expecting an item instead...
>
> Somebody is going to tell me that the XML suite in System Events doesn't work
> and I'd better use [asobjc|satimage's xmllib|something else] but before I
> move forward with other tools I'd like to confirm the above issue...
I made some Cocoa Frameworks with open-source based Objective-C program to
parse XML into NSDictionary.
I can parse a large XML file (80MB) by calling the framework from
AppleScriptObjC.
It tooks about 50 seconds to parse without crashing on my environment (MacBook
Pro Retina 2012, Core i7 2.6GHz).
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
_______________________________________________
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