Hello 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.
Sax. > 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
pgpH5cWNDJOIj.pgp
Description: PGP signature
