➢ It would be useful if it could be combined with XMLHttprequest

Why?  Why not just use SAX for initial parse and DOM methods there after?

Thanks,
Austin Cheney, CISSP

From: [email protected] [mailto:[email protected]] On Behalf 
Of Johannes Nel
Sent: Sunday, January 01, 2012 5:05 AM
To: [email protected]
Subject: Re: [JSMentors] Re: SAX vs DOM

>>SAX is perfect for data stream
or extremely large files.
On Sun, Jan 1, 2012 at 11:02 AM, Alexandre Louis Marc Morgaut 
<[email protected]> wrote:


It would be useful if it could be combined with XMLHttprequest but at some 
point the data might become so big in the responseText that you should close 
the request and open a new one
Web Sockets might be a better fit today (but it creates some few overload)

I know another interesting parser which is : "XML for 
<SCRIPT>" http://xmljs.sourceforge.net/
It is older but I think more complete and can work also on the server (no 
dependency to window or document)


On 1 janv. 2012, at 07:40, Karuna sagar K wrote:


The one that I know of - https://github.com/ndebeiss/jsXmlSaxParser
On Sun, Jan 1, 2012 at 1:51 AM, dtang85 <[email protected]> wrote:

Is there a SAX parser for JavaScript? From what it sounds like, you'd
use DOM API methods when you know something about the XML like an ID,
an attribute, or tag names whereas with SAX you can parse the XML
without knowing anything about its structure beforehand.

On Dec 31 2011, 9:05 pm, Poetro <[email protected]> wrote:
> 2011/12/31 dtang85 <[email protected]>:
>
> > Whats the difference between SAX and DOM? Someone asked me that and my
> > initial thought was that DOM API methods is the main API for XML. Can
> > someone clarify? Thanks!
>
> SAX stands for Simple API for XML, and is a different method to parse
> the XML. The parser goes through the XML file and triggers event for
> everything it encounters. For example when it finds an opening tag, it
> triggers an event, when it finds an attribute, it triggers another
> one, when it reaches a text node then another, when it reaches the end
> of the tag then another. So it sequentially parses the XML file
> triggering event for everything it encounters within the XML during
> parsing. It is really fast, but it is sequential, so you cannot go
> back and forward withing the XML with it. If you want to do another
> run in the XML, you have to parse the whole XML another time, or you
> build a DOM like document during the SAX parsing.
>
> --
> Poetro

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]


-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/
 
To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/
 
To unsubscribe from this group, send email to
[email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/
 
To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/
 
To unsubscribe from this group, send email to
[email protected]




-- 
j:pn 
\\no comment
-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/
 
To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/
 
To unsubscribe from this group, send email to
[email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to