Re: [xml] Returning error codes from start/endElement

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.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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