RE: [xml] XMl Schema validation difficulties
- From: "Buchcik, Kasimier" <k buchcik 4commerce de>
- To: <heinzer david wanadoo fr>
- Cc: xml gnome org
- Subject: RE: [xml] XMl Schema validation difficulties
- Date: Tue, 9 May 2006 13:07:53 +0200
Hi
-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]