Re: libxml returns codes and xmlreader

From: Date: Fri, 19 Aug 2011 12:47:05 +0000
Subject: Re: libxml returns codes and xmlreader
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-54727@lists.php.net to get a copy of this message
Hi! [...] >> Nevertheless, is there a "real" reason >> why this is not implemented? Anyone else feeling uncomfortable with >> "calling additional functions to check for error conditions"? > It is modeled after the .NET XMLReader interface with simple boolean > return values. You can file a feature request to enable exceptions to be > thrown from the reader on invalid XML. i.e. argument to constructor > whether or not to throw exceptions (default false). Right now regardless > of returning false or an int value, you would have to check something to > determine if it were an error or no data (either a function as it is > right now or for a specific return value), so it's always an extra step. Of course it is an extra step both ways. But using libxml_get_errors() forces me to use libxml_use_internal_errors and libxml_clear_errors afterwards. Until xmlreader throws exceptions on errors it is not modeled after the .NET XMLReader, because that part is really missing. So the argument chain is somehow broken here :) Is it possible to reopen my bug and change it to a feature request or do I have to resubmit my thoughts? Greetings, Nico

« previous php.internals (#54727) next »