[xml] XMl Schema validation difficulties



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?  


Thanks for your answers.

Heinzer David

ps : sorry for my poor english




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