Re: [xml] SAX interface and xmlSubstituteEntitiesDefault()

On Fri, Sep 10, 2004 at 07:37:15AM -0700, Bill Moseley wrote:
We are calling xmlSubstituteEntitiesDefault(1); in our code, but the
entity is not magically replaced in the output like I had hoped.

  libxml2 entities support requires some of the tree constructs
done in the default SAX handlers. So this won't work.

Can someone help clear up my confusion on this issue?  And is there a
way to get these entities expanded in the SAX parser output?

  you could play with the SAX handlers pointing for examples
at the default entities declaration handling but even that won't
work in the general case.

On a related note, I'm using the SAX interface example by James
Henstridge as linked off  Yet,
I now see off the API menu the SAX2 interface and that the one I'm
using is deprecated.  I briefly looked through the changes file and tried
searching (but "sax" is a bit common a search term) for info on the
change to SAX2.  Is there a guide or list discussion someone can point
me to about this change and what is required to move to that
interface (and if/when the old SAX interface might no longer be

removing APIs won't be done until a new incompatible 3.x is released and
I have no such plan so far. Discussions about the changes were one year
ago on this list, try to look in the archive from mid aug-2003 to end
of Sep-2003. The new APIs provide namespace informations and attribute
defaulting too.


Daniel Veillard      | Red Hat Desktop team
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]