Re: [xml] Returning error codes from start/endElement
- From: Daniel Veillard <veillard redhat com>
- To: Dan McRae <dan mcrae cometsolutions com>
- Cc: xml gnome org
- Subject: Re: [xml] Returning error codes from start/endElement
- Date: Thu, 26 Apr 2007 04:52:42 -0400
On Wed, Apr 25, 2007 at 02:53:48PM -0600, Dan McRae wrote:
How do I pass return/error codes from startElement() and endElement() up
to xmlSAXUserParseFile()? xmlSAXUserParserFile() returns an int but
startElement() and endElement() both return void.
You can't. That error can't be a parsing error, so it should not affect
the parser. If you want to stop parsing use xmlStopParser() .
People, DO NOT USE SAX, unless you really have a really good reason
to do so, use the reader instead you will avoid most of the mess.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
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]