Re: [xml] xmlParseChunk...



On Mon, Nov 03, 2003 at 11:54:02PM +0100, aliban gmx net wrote:
On 3 Nov 2003 at 17:28, Daniel Veillard wrote:

  yes I know, I did a small Jabber implementation on top of SAX
using libxml2 2 years ago, so it's defintely doable.
  Still if the client send <foo>bar</foo> at the TCP/IP
socket interface, you have no garantee to receive the chunk in one block
the only thing saving it is taht usually the XML is "formatted"
and the linefeed will force a flush on the TCP/IP stream.

  Worked for me at the time.


if "<stream:stream ....>"
is received i send it to my reader and the reader will 
xmlCreatePushParserCtxt() to create the parser buffer. whatever this 
does not call any sax handler (at least it should call 
documentStart() +  elementStart already)

any further socket data is pushed to the reader and the reader does 
xmlParseChunk(). whatever this still does not result in callbacks 
like elementStart() ... how to do this!? i don't understand...

can you show me sample code?

  testSAX.c in the distribution.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]