[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Schema validation from API
- From: Daniel Veillard <veillard redhat com>
- To: Garcia Jose Miguel-JGARCIR1 <jmgarcia motorola com>
- Cc: xml gnome org
- Subject: Re: [xml] Schema validation from API
- Date: Wed, 28 Apr 2004 10:33:52 -0400
On Mon, Apr 26, 2004 at 12:37:00PM +0200, Garcia Jose Miguel-JGARCIR1 wrote:
> Hi all,
>
> I´m trying to validate a XML file by schema.xsd
>
> With xmllint, everything is Ok,
> >xmllint --noout --schema test.xsd test.xml
> test.xml validates
>
> How should I make this validation through API ?
>
>
> reader = xmlReaderForFile(test.xsd , NULL, NULL);
W3C Schemas validation is not available at the Reader level.
You must build a tree and validate it.
See the testSchemas.c example from the source code for an idea
on how to do this. If you need advanced validation and streaming
use Relax-NG schemas. I need to add such an example on-line.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]