On Nov 5, 2007, at 6:35 AM, 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 can too.
Expat (a fairly common XML parser out there) will do the job just
fine. Your network engine has to separate each stanza out, sure, but
that's not hard. And then you can pass each stanza unaltered through
expat and get back your usual XML structures. You would no longer be
able to do that with binary blobs; you would have to special-case blob
stanzas fairly heavily, since I guarantee you that if the characters
'<' or '>' appear un-escaped in the binary blob, Expat will choke and
die.
I'm reasonably sure the same could be said of most other off-the-shelf
XML parsers.
Sorry, but I'm with vorner on this one; the blob mechanism is neat,
but too much of a departure from what we have to make it a smooth
upgrade. Changing stanza types and so on is one thing, but changing
the entire parser -- and requiring people to literally re-invent the
wheel and roll their own XML parsers -- is much less likely to be a
friendly upgrade, or receive any sort of wide adoption.
If we really need a non-BASE64 method of sending binary data between
clients, I suggest we re-use Jingle. That already is a mechanism for
negotiation of 'I want to send you this type of data, how do I get it
to you?' There's very few cases I can think of where we would want to
be sending binary blobs in a server-cached manner anyway.
--
Rachel Blackman <[EMAIL PROTECTED]>
Trillian Messenger - http://www.trillianastra.com/