[jdev] Re: Re: Parsing XMPP/Jabber protocol

Maxym Gorodetskyy maxgor at topletter.com
Wed Dec 29 12:27:28 CST 2004


Thanks Mickael 

SAX works fine, it throw the same exception as DOM, but gives all parsed
elements.


Mickael Remond wrote:
> 
> To parse stream you need an event-based parser (SAX support) and not a
> tree based parser (like DOM), because a tree-based parser need to have
> the complete document to build the tree in memory.
> Sax based parsing send events during parsing regarding opening/closing
> tags, contents, etc and can thus parse a stream (potentially infinite).
> 
> In Java, Xerces support both mode for example.
> 
> I hope this helps,
> 

-- 
Best regards
Maxym Gorodetskyy





More information about the JDev mailing list