[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-users
Subject:    Re: Error in DOMDocument::getDocumentElement?
From:       "Alain Leblanc" <aalebl () gmail ! com>
Date:       2008-01-17 15:14:14
Message-ID: 635e59d40801170714q41cc9059h4a804a98b1e7c596 () mail ! gmail ! com
[Download RAW message or body]

There are examples for implementing a DOMErrorHandler in the DOMCount
and DOMPrint directories from the 'samples' directory from the
distribution. To get it you just need to download the file
xerces-c-src_2_8_0.tar.gz for the xerces web site.

2008/1/17, Sven Bauhan <sven@ast.dfs.de>:
> Hi Alberto,
>
> thanks for the fast answer.
>
> On Thursday 17 January 2008 15:13, Alberto Massari wrote:
> > Hi Sven,
> > Xerces tries to recover from non-fatal errors, so you should install a
> > DOMErrorHandler to get notified of any error, and return "false" to
> > abort parsing.
>
> But it was a fatal error, I tried a file with the first line:
> "G<?xml version="1.0" encoding="UTF-8" standalone="no">"
> With the 'G' this is no valid xml.
>
> Further if xerces manages to recover from errors, I would expect, that I can
> access the elements and do not suddenly get a null-pointer.
>
> > You can then check your error handler object for the number of errors
> > occurred, and their associated descriptions.
> >
> I recently tried to install a DOMErrorHandler, but did not succeed yet.
>
> Sven
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic