Re: [xml] Parsing error handling ? (suite)
- From: chrisbee xml swing be
- To: xml gnome org
- Subject: Re: [xml] Parsing error handling ? (suite)
- Date: Fri, 7 Jun 2002 18:01:39 +0200 (MET DST)
> On Fri, May 31, 2002 at 05:13:49PM +0200,
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 er! ror, but I'd like to receive
> > a more precise error code that I can test later. How can I do that ?
>
> either redirrect the error funtion to your own routine
Do you mean that I need to use xmlSetGenericErrorFunc ?
If so, I already did that, but I get a string message that I can't test.
What about the context ? Is it a way to provide an instance of an XML API
struct that can be used (initialized) by the parser or is it a way to
provide a user-defined struct that is passed in case of error ?
> or use a lower level api than xmlParseFile and look at the status in
> the parsing context.
>
I inspect the source code and I see that you
are using a SAX xml parser to do the job. Do you mean that I need to use a
SAX parser and check 'errNo' in the context object as you did in the code ?
Or do you think to something else ?
Thanx
Christophe Bourez
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]