From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Aug 24 1999 - 10:54:28 EDT
On Tue, Aug 24, 1999 at 03:47:25PM +0200, Stephane Conversy wrote:
>
> How to handle error while parsing an xml file ?
>
> Is there a way to register a callback with a line number and a message ?
yep, change the warning and errors function in the SAX callback
block and have them point to your own function. The parser context
which is passed as first argument holds file and line informations
look at the existing code in error.c:
http://dev.w3.org/cgi-bin/cvsweb/XML/error.c?rev=1.17&content-type=text/x-cvsweb-markup
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:43 EDT