Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

XML Parsing

Author Message
collin



Joined: 02 May 2005
Posts: 17

Posted: Thu May 05, 2005 - 3:58 pm    Post subject: XML Parsing Reply with quote

I'm working on a widget that will need to parse a sizeable XML file, and I've successfully used xmlhttprequest to open the file, and "XML for SCRIPT" from http://xmljs.sourceforge.net to parse XML. For some reason, though, it chokes when I use a large (like 5 MB) XML document. Just to make sure, I downloaded Oxygen and validated the XML. It's valid, but the XML parser chokes. I'm not even attempting any operations on it anymore - I've commented it all out. Could it just be a widget limitation?
View user's profile Send private message Widgets
collin



Joined: 02 May 2005
Posts: 17

Posted: Thu May 05, 2005 - 5:00 pm    Post subject: Reply with quote

Alright, after a ton of trial and error, it seems there's about an 8 KB limit on either xmlhttprequest, the javadcript variable that holds the result, or the xml parser. Not sure which. Might I give widget.system() async reading a try?

Update: Nope, even asynchronous reading fails beyond a few KB, even without parsing the XML. Maybe this is Apple hinting that widgets are supposed to be very *lightweight*?
View user's profile Send private message Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group