Hi 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of David HEINZER
> 
> Hello,
> I contact you cause of difficulties to recover error and 
> warning messages during a XML Schema Validation.
> I'm taking like example the source code suggested in the 
> libxml2 FAQ and I'm using the last version of libxml2.
> 
> _____________source code :___________
> ctxt = xmlSchemaNewValidCtxt(schema);
> xmlSchemaSetValidErrors(ctxt,
>                       (xmlSchemaValidityErrorFunc) fprintf,
>                       (xmlSchemaValidityWarningFunc) fprintf,
>                       stderr);
> ret = xmlSchemaValidateDoc(ctxt, doc);
> _____________________________________
> I would like to recover the messages to show it on a specific 
> console and to write a log file. Does it exist a variable 
> which stocks the error and warning message?  

Try using the structured error handlers:
xmlSchemaSetParserStructuredErrors() and
xmlSchemaSetValidStructuredErrors()

http://xmlsoft.org/html/libxml-xmlschemas.html#xmlSchemaSetValidStructur
edErrors

Regards,

Kasimier

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to