Re: [xml] Ignoring undefined entities

On Thu, May 16, 2002 at 12:45:09PM -0400, Michael Rothwell wrote:
Is there a way to ignore undefined entities? Or to take some default action
(i.e., insert some standard replacement text, like a comment, into the
document in place of the undefined entity) using a callback function or
other means?

  Look at SAX.c, override the default entities entities handling routines
with your in the default SAX handler. For example testXPath.c does 
something similar to avoid generating CDATA blocks in the tree:
           xmlDefaultSAXHandler.cdataBlock = NULL;


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