From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Sep 01 1999 - 09:56:42 EDT
On Wed, Sep 01, 1999 at 03:26:44PM +0200, Stephane Conversy wrote:
>
> I succeeded in parsing and validating a file.
> However I used hidden functions in parser.c,
> because I wanted to redirect errors messages.
>
> I need a simple example that do this thing:
>
> // begin
>
> build an xmlDtdPtr from a .dtd file
> redirect error msgs
>
> for each file:
> build a xmlDocPtr without validating it
> validate it with the xmlDtdPtr
>
> // end
>
> It will prevent the parser to parse the external
> dtd each time I want to parse and validate a xml file.
Use xmlParseDTD(NULL, filename);
http://rpmfind.net/veillard/XML/gnome-xml-parser.html#XMLPARSEDTD
and and upcoming function based on xmlValidateDocument()
http://rpmfind.net/veillard/XML/gnome-xml-valid.html#XMLVALIDATEDOCUMENT
but which is not yet implemented
In the meantime, parse the dtd each time, it's not that costly ...
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux, WWW, rpmfind, Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | rpm2html, XML, http://www.w3.org/People/W3Cpeople.html#Veillard | badminton, and Kaffe. ---- Message from the list xml@rufus.w3.org Archived at : http://rufus.w3.org/veillard/XML/messages to unsubscribe: echo "unsubscribe xml" | mail majordomo@rufus.w3.org
This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:46 EDT