Re: [xml] Parsing error handling ?



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

Hi,

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 http://trash.chregu.tv/domxml_CVS_HEAD_validation.diff 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).

chegu




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