Re: [xml] Ability to plug in schema validation on top libxml2 SAX parser
- From: Daniel Veillard <veillard redhat com>
- To: Sarmishtha Bhattacharya <sarmishtha bhattacharya gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] Ability to plug in schema validation on top libxml2 SAX parser
- Date: Thu, 3 Mar 2011 08:59:28 +0800
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/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]