Re: How to limit errors from XML::LibXML::Schema
Michael Ludwig <[email protected]> Tue, 14 Sep 2010 00:06:46 +0200
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <20100913220646.GA3812@wladimir> |
Martin J. Evans schrieb am 13.09.2010 um 15:36 (+0100): > I'm using XML::LibXML::Schema to validate a document against a > schema. Malicious input of documents with lots of errors is > causing me a headache as the error string code obviously does some > recursion and I get: > > Deep recursion on subroutine "XML::LibXML::Error::as_string" at > /usr/local/lib/perl/5.10.0/XML/LibXML/Error.pm line 182 > > Does anyone know if there is a way to limit the number of errors > found/reported or any other way of avoiding the deep recursion. Don't know. You could give suppress_errors [1] a try, but I'm neither sure it is applicable for schema validation errors nor it works at all [2]. [1] perldoc XML::LibXML::Parser [2] https://rt.cpan.org/Public/Bug/Display.html?id=58024 -- Michael Ludwig _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs