[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jabber-jdev
Subject:    Re: [jdev] parsing xml (xmpp) with ruby
From:       Jonathan Dickinson <jonathan.dickinson () k2 ! com>
Date:       2008-10-02 10:08:44
Message-ID: A790BE8D83ECC3469047C2E344EABE61D209E1562F () zamail01 ! k2workflow ! com
[Download RAW message or body]

Maybe it is something that is amiss in the Ruby world?

Why not try to get REXML to handle streaming XML? Throwing and catching exceptions on \
a server on a regular basis isn't the best idea (the same reason why we don't \
continually give ourselves papercuts and stick a plaster on them).

There *must* be a common point where it decides that the XML document is incomplete, \
maybe you can add fragment support there, instead of throwing an exception. I think \
the best idea would be to make a new type of XML node (e.g. IncompleteXmlNode) and \
return that.

Otherwise you will have to roll your own, which is only about a week of work: it's \
not *that* bad.

I will look at the code now and see if I can offer any insight.

> -----Original Message-----
> From: jdev-bounces@jabber.org [mailto:jdev-bounces@jabber.org] On
> Behalf Of Eric Will
> Sent: Wednesday, October 01, 2008 10:04 PM
> To: Jabber/XMPP software development list
> Subject: Re: [jdev] parsing xml (xmpp) with ruby
> 
> On Wed, Oct 1, 2008 at 3:59 PM, Remko Tronçon <remko@el-tramo.be>
> wrote:
> > I don't know anything about REXML. Looking at the source code,
> there's
> > a bunch of parsers, but all of them call 'pull' somewhere, so that
> > makes me suspect that something's not right. The only people that can
> > help you are the other Ruby developers that did XMPP work, and I
> think
> > all of them already replied in this thread. Maybe you should look at
> > their code to see how they do it, and talk to them if you need help?
> 
> XMPP4R is the only other Ruby project I can find out there. I asked
> what you use to see if I could find Ruby bindings for it. XMPP4R uses
> REXML, and as far as I can tell after looking through the code for an
> hour or so is that it does the same thing I do, and closes the stream
> when it gets an exception from REXML.
> 
> > cheers,
> > Remko
> 
> -- Eric Will // rakaur --
> _______________________________________________
> JDev mailing list
> FAQ: http://www.jabber.org/discussion-lists/jdev-faq
> Forum: http://www.jabberforum.org/forumdisplay.php?f 
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe@jabber.org
> _______________________________________________
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f 
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe@jabber.org
_______________________________________________


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic