On Sat, Sep 27, 2008 at 9:28 PM, Eric Will <[EMAIL PROTECTED]> wrote:
> [...] I have to wrap every > incoming chunk of XMPP with my own <root/> tag, and then ignore that > after REXML parses it. I am currently unhappy with this approach. > What happens in the incoming data chunk isn't well formed XML, do you cache it somehow? If I ever had to write my own xmpp parser, I would use a SAX like parser to isolate the elements from the input stream, so I knew that they were well formed, and then I would put them into a fake XML document using the stream element. i.e. use the stream stanza from the opening of the stream - that way you get the namespace declarations right for free and element.parent is 'valid'. -- - Norman Rasmussen - Email: [EMAIL PROTECTED] - Home page: http://norman.rasmussen.co.za/
_______________________________________________ JDev mailing list FAQ: http://www.jabber.org/discussion-lists/jdev-faq Forum: http://www.jabberforum.org/forumdisplay.php?f=20 Info: http://mail.jabber.org/mailman/listinfo/jdev Unsubscribe: [EMAIL PROTECTED] _______________________________________________
