[jdev] Help parsing incremental XML

Jacek Konieczny jajcus at bnet.pl
Tue Apr 20 01:54:25 CDT 2004


On Mon, Apr 19, 2004 at 10:45:18PM +0200, Petr Ferschmann wrote:
> Hello,
> 
> and how you handle namespaces? 
> 
> I can easily send you this stream:
> 
> <s:stream xmlns:s="..." xmlns:client="jabber:client" ...>
>   <client:iq ...>
> 
> Do you handle that?

My preparser doesn't have to do that. It will just pass:

<s:stream xmlns:s="..." xmlns:client="jabber:client" ...>
	<client:iq .../>
</s:stream>
	
to the libxml2 parser which will handle namespaces as they should be
handled.

> > is right, but I made a workaround - simple XML preparser which splits
> > input stream into chunks (like stream start or single, complete stanza)
> > which are passed to the real (libxml2) XML parser for DOM-like tree
> > generation. Such workaround can be used for any XML parser API which
> > work on whole documents only.

Greets,
	Jacek



More information about the JDev mailing list