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

Re: [xml] Error handling with the XmlReader API



On Mon, Jan 13, 2003 at 02:17:02PM +0100, Stéphane Bidoul wrote:
> Hi Daniel,
> 
> On the same error handling theme, I think
> we need a specific error handling API associated with
> the XmlReader interface.
> 
> Currently, I use the global error handler 
> (libxml2.registerErrorHandler), but that's far
> from perfect; in drv_libxml2, for instance, it
> is a limitation (only one sax driver can be active 
> at a given moment).
> 
> In .NET, that's easy, they have exceptions...

  That could probably be emulated around the existing entry points.

> What's your opinion on this?
> Would you see a callback interface 
> or something like getLastError()?

   Well the C reader implementation uses a parser context. the same
code for the general case can probably be reused nearly as-is except
for the freeing part. Or a completely different approach can be attempted
(and exception would be fine).

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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