[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30789: 26.0.91; xml-parse-region works but libxml-parse-html-region
積丹尼 Dan Jacobson
bug#30789: 26.0.91; xml-parse-region works but libxml-parse-html-region doesn't
Tue, 13 Mar 2018 11:29:50 +0800
Thank you for the patch but the real answer is to do what all other
browsers do... show as much as possible.
There is no browser out there that would dream of dying on the slightest
Anyway if you guys are really going to use XML::LibXML::Parser (?) then
maybe loosen up some of
/parser, html, reader/
recover from errors; possible values are 0, 1, and 2
A true value turns on recovery mode which allows one to parse broken
XML or HTML data. The recovery mode allows the parser to return the
portion of the input document. This is useful for almost well-formed
documents, where for example a closing tag is missing somewhere. Still,
only parse until the first fatal (non-recoverable) error occurs,
reporting recoverable parsing errors as warnings. To suppress even these
Note that validation is switched off automatically in recovery mode.
validate with the DTD; possible values are 0 and 1
XML::LibXML throws exceptions during parsing, validation or XPath
processing (and some other occasions). These errors can be caught by using eval
blocks. The error
is stored in address@hidden There are two implementations: the old one
throws $@ which is just a message string, in the new one $@ is an object from
XML::LibXML::Error; this class overrides the operator "" so that when
printed, the object flattens to the usual error message.
XML::LibXML throws errors as they occur. This is a very common
misunderstanding in the use of XML::LibXML. If the eval is omitted, XML::LibXML
will always halt your
script by "croaking" (see Carp man page for details).
Also note that an increasing number of functions throw errors if bad
data is passed as arguments. If you cannot assure valid data passed to
XML::LibXML you should
eval these functions.
Note: since version 1.59, get_last_error() is no longer available in
XML::LibXML for thread-safety reasons.
bug#30789: 26.0.91; xml-parse-region works but libxml-parse-html-region doesn't, 積丹尼 Dan Jacobson, 2018/03/12