On Wed, Mar 02, 2011 at 02:21:47PM -0800, Sarmishtha Bhattacharya wrote: > Hi, > > My question is about schema validation with libxml2 sax parser. > Is it possible to get schema validation done with a sax parser in single > parse i.e. when the xml is parsed at that > same time the schema validation also takes place. I do not want to build a > tree build after the parsing, i.e. i want > to retain the streaming model of sax parser.
use xmlSchemaValidateStream() see xmllint.c for an example of use But for streaming the reader is a way better API than SAX and xmlTextReaderSchemaValidate() is the right call for this, also easier to use. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [email protected] | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
