Re: DOM recover error reporting mode
| From: | nico | Date: | Sat, 10 Feb 2007 13:49:01 +0000 |
| Subject: | Re: DOM recover error reporting mode | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27982@lists.php.net to get a copy of this message | ||
Christian Stocker wrote:
On 9.2.2007 18:10 Uhr, Nico Sabbi wrote:I see, but in my opinion since the recover mode is off by default and E_WARNING is on by default, if recover mode is explicitly activated php should respect the developer's need to keep the interpreter as quiet as possible. A developer with more stringent needs will either keep recover mode off or activate it alongside with E_WARNING. BTW, I've seen thousand of xml docs declared "broken" not for syntax errors, but for the simple presence of characters not corresponding the the encoding specified... Nicomay I re-propose the attached patch? The first time it was ignored, but the current behaviour of dom module is extremely annoyingCompletely out of context your post, but I was the one who wrote that part of code, since I was more or less forced to implement it the way it is. I'm fine with removing it, but there were big objections against the whole recover stuff back then when I committed it, so the way it works currently was some kind of compromise See also: http://blog.bitflux.ch/archive/2004/08/13/parsing_non_well_formed_xml_documents_in_php.html http://blog.bitflux.ch/archive/2004/08/20/parsing_non_well_formed_xml_documents_considered_harmful.html and don't forget the comments :)