Re: [xml] Parsing error handling ?

On Fri, 31 May 2002 chrisbee xml swing be wrote:


After parsing an XML file, I'd like to know why the parsing fails.
xmlParseFile() returns NULL in case of error, but I'd like to receive a more precise error code that I can 
test later. How can I do that ?

AFAIK you have to register your own error-handlers in the Sax interface
and then do something there. I did that for better error-reporting in
php's domxml (not committed yet, if anyone is interested, there's a patch
at and it's not
finished yet...). You get quite a lot of information during parsing. But I
couldn't manage to get much useful information during validation with
xmlValidateDocument() (just the standard error message).


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