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

Cathayan cathayan at gmail.com
Thu Dec 30 20:00:10 CST 2004


if i don't misunderstand it, java xerces2's SAX parser can deal with
delayed inputstream very well, i just tried it and get the jabber
server's returned id correctly, no tricks needed again.

see it:

http://xml.apache.org/xerces2-j/samples-socket.html#DelayedInput


On Thu, 30 Dec 2004 15:31:28 +0000, Bill de hÓra <bill at dehora.net> wrote:
> JD Conley wrote:
> > I think we'd all agree.  But if you parse through the code in all the
> > open source libraries posted earlier you'll most likely find nobody has
> > been able to do it without being tricky.  Even though the XMPP code I
> > work on isn't available, I can say that our XMPP parser is tricky as
> > well.  It seems stream based XML parsers need another rev before they're
> > up for the task of XMPP without intervention.
> 
> I find myself in agreeing. I was dealing with this a while back in
> Python and there doesn't seem to be a clean way to deal with either
> delayed closing tags or incomplete XML buffers (I'm planning to get back
> to that parsing library in the new year and I'm not looking forward to
> it). I'm not sure whether this is a 'feature' in the XMPP stream/frame
> design or whether XML is suboptimal for streaming protocols (possibly
> both). It may be as simple as having SAX implementations revved,
> nonetheless I don't understand the rationale for leaving an XML parse in
> mid air the way XMPP does it, as opposed to say a series of self
> contained XML documents.
> 
> cheers
> Bill de hÓra
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mail.jabber.org/mailman/listinfo/jdev
> 


-- 
cathayan at gmail.com



More information about the JDev mailing list