Re: [xml] Error messages

On Thu, Mar 14, 2002 at 02:42:42PM -0800, Jean-Yves Lamoureux wrote:
I was looking at the libxml2 sources, and I was wondering if there was a way to suppress all error messages 
printf'd when an error occurs. It is a bit annoying, but I didn't find a #define or something to avoid that.

  Try xmlSetGenericErrorFunc()

Then, is there a way to check validity of an XML file on the xmlDoc structure returned by xmlParseMemory() 

  That's possible assuming the DTD informations are present  (and
xmlParseMemory() makes it harder if there is no base URI).

  look at xmllint.c postvalid code it does this kind of things.


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]