Re: [xml] Error handling



On Wed, May 18, 2005 at 01:42:24PM -0500, Gijun Lee wrote:
thing I am left with is regarding error handling. Seems like libxml prints 
all errors into stderr. For example, if a XML document has invalid entries, 
it catches the error and prints into stderr.  But I want to capture that 
error message and send the error message to the user via email.

I want to know how I can capture the error message and put into a buffer. 
Any information would be greatly appreciated. Of couse, any example would 
be good, too.

  http://xmlsoft.org/html/libxml-xmlerror.html#xmlSetStructuredErrorFunc
  use the xmlSetStructuredErrorFunc() to override the default handler.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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