[Standards] Binary data over XMPP

Michal 'vorner' Vaner vorner at ucw.cz
Mon Nov 5 14:59:43 UTC 2007


On Mon, Nov 05, 2007 at 03:35:19PM +0100, Tomasz Sterna wrote:
> Dnia 05-11-2007, Pn o godzinie 12:51 +0100, Michal 'vorner' Vaner pisze:
> > You probably can not do that with any reasonably out-of-the-box XML
> > parser.
> You cannot use out-of-the-box XML parser anyway.
> You need a one that parses and returns every <stream/> subelement
> separately.


> you stop feeding the data read from socket to parser, and fetch it
> directly for routing.

Unless you work like:
Got something on network, read all or full buffer (lets say max 4kB),
push it trough utf-8->internal strings and take the whole lot and feed
it to the parser.

Now you got a blob somewhere in the middle you dragged trough the
codepage changer (and destroyed it, destroying the rest of the data too,
potencialy) and pushed it down the throat of the poor parser, when it
reported the blob start.

> > Furthermore, you may need to pass the stream trough charset
> > decoder to get some internal stringish representation.
> What for?
> Does your language-of-chice not have an effective binary blob
> representation?

But I want to feed my parser with strings. I can not even fill it with
chars one by one, because I do not know, when each utf-8 char ends.

This message has optimized support for formating.
Please choose green font and black background so it looks like it should.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20071105/fd137739/attachment.sig>

More information about the Standards mailing list