[jdev] parsing xml (xmpp) with ruby
Michal 'vorner' Vaner
vorner at ucw.cz
Tue Sep 30 14:05:12 CDT 2008
Hello
On Tue, Sep 30, 2008 at 11:42:13AM -0400, Eric Will wrote:
> On Tue, Sep 30, 2008 at 9:57 AM, Remko Tronçon <remko at el-tramo.be> wrote:
> > Hmm, how can a SAX parser complain about a partial XML file? SAX *is*
> > incremental. It would probably help if you described in a high level
> > how your parser works, how you feed it data, ...
>
> It doesn't complain about a partial file. If I pass it a partial
> stanza, with say the end tag only halfway finished, like "</prese" it
> raises an exception. The exception tells me nothing that I can use to
> isolate the incomplete stanza and save it to be appended onto later.
Strange. Mine (Qt version of Sax parser) does not. But I enabled the
„incremental“ feature ‒ it allows putting data into it in bits. It just
remembers the start and once it gets more data, it resumes.
You probably have some similar switch for the parser, too.
--
All flame and insults will go to /dev/null (if they fit)
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20080930/d7f89ee2/attachment-0003.pgp>
More information about the JDev
mailing list