Re: [xml] Schema validation from API

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 Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]