[xml] Validate with SAX2
- From: "Giorgio Calderone <gcalderone neomedia it>" <gcalderone neomedia it>
- To: xml gnome org
- Subject: [xml] Validate with SAX2
- Date: Mon, 30 Oct 2006 22:02:34 +0100 (CET)
Hello,
I'm using a SAX2 parser in push mode that should validate the XML document, in
the following way:
//Set all my callbacks functions in mySAXHandler...
f = fopen(filename, "r");
ctxt = xmlCreatePushParserCtxt(mySAXHandler, ...);
int ret = xmlCtxtUseOptions(ctxt,
XML_PARSE_DTDLOAD |
XML_PARSE_DTDATTR |
XML_PARSE_DTDVALID );
while (fread(...))
xmlParseChunk(...);
What happened is that the document is not valid (as I tested it with the example
program "parse2") but xmlParseChunk doesn't return any error.
Is there a way to validate a document using SAX2, or am I missing something ?
Thank you,
Giorgio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]