Re: [xml] Custom Error Handling Dilemma

On Thu, Oct 23, 2003 at 03:23:55PM -0400, John Coyle wrote:
Hi All,

      I'm new to libxml2 community so I'm not sure how relevant my
problem is to others . I am using libxml2 (2.2.6) for validating XML
docs against XML schemas and have implemented custom error handlers to
catch the great parsing and validation warnings and errors. The current
implementation of xmlReportError() invokes the error handlers multiple
times for the same error, this makes it tricky to implement any kind of
predictable error handling. i.e if you want to catch the error and log
it or report it to another system. Why does xmlReportError() not buffer
the entire error msg and report it to the generic or user defined
handler in a single call ? That way people who implement their own error
handlers could assume that they would only here about an error or
warning once.

Is there another way to achieve this effect that I have overlooked?

  The error layer have been completely rewritten in 2.6.0, I suggest you
have a look at the new code in that version.


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]