Re: [xml] SAX and buffering



On Fri, Jan 30, 2004 at 09:30:18AM +0000, Ed Griffiths wrote:

I've looked at the libxml website and searched archives and docs and articles
but been unable to discover how to:

I am using libcurl to get XML data from an http server and I want to get libxml
to parse the data from libcurl as it comes over, calling my libxml callbacks as
the data flows through.

I'm feeling stupid as I can't see how to get libxml to do this for SAX style
parsing.

  You can do that in 2 ways:
    - the clean way: redefine libxml I/O handlers to use libcurl
      see the xmlIO module and the example io1.c in the doc examples
    - the ad-hoc way, by building a progressive parser and feeding
      data as they arrive though libcurl.

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]