Re: [xml] Interfacing with libxml2

On Sun, Oct 01, 2006 at 11:33:48AM +0200, Joachim Zobel wrote:
Am Freitag, den 29.09.2006, 09:13 -0400 schrieb Daniel Veillard: 
On Thu, Sep 28, 2006 at 10:07:30PM +0200, Joachim Zobel wrote:
  look at the entry points in SAX2.c
but I don't think anyone ever tried to plug libxml2 on top of expat
and it may require some debugging

This looks pretty good. If I understand this correctly, XML parsing in
libxml2 goes through the SAX2 interface and the the SAX2.c functions are
the callbacks that pass the SAX events to the higher level stuff. 

  Yes, when not using the older SAXv1 interfaces.

So this means I can move from expat to libxml2 (the SAX interface is
quite similiar) and put the higher level libxml2 functionality into
seperate filters, that can be glued together controlled by processing
instructions, possibly a special namespace and apache config.

  Some of the entry points are different from the old expat for example
support for namespaces, check
for example attributes are given using 4 string pointers. Also everything
is always converted to UTF-8 it's not in the document native encoding.

The goal is to build something that can (for example) run a streaming
XPath expression and treat all matches as tiny seperate documents that
are processed by an xslt stylesheet.

  You will still need to build some kind of tree to process with libxslt,
but that should be doable (but not trivial).


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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