Re: [xml] external entity references using SAX interface



On Wed, 20 Nov 2002 16:56:16 -0500
Daniel Veillard <veillard redhat com> wrote:

On Wed, Nov 20, 2002 at 09:58:00PM +0100, Vassili Dzuba wrote:
Hello,

I have a problem when trying to write an application 
using the SAX interface when processing a reference
to an external entity reference.

  Yes, libxml SAX interface + entities is a real real pain.
Sorry there is no easy way, serious assembly required !
It's possible, the DOM build is done on top of SAX, but
I promise you won't like it. Read re-read the SAX.c module
as well as the entity.c one...

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/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml



Well , the dom interface might be build on top of sax,
but there are a few special cases in parser.c related to the
dom tree generation, so that i'm not sure that the dom tree generator
can be build from a pure sax interface, and i would prefer not
to have to patch libxml2

i know that the libxml documentation explicitely counsel to use
the dom interfce if one has to use entities, but i don't see any
philosophical reason why a sax interface should be so 
entity-unfriendly...


Anyway, l'll have a deeper look at the source...

Vassili Dzuba



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