Closed dwarring closed 4 years ago
Here's how Perl 5 XML::LibXML handles this:
perl -MXML::LibXML -E'say XML::LibXML->new->parse_file("/tmp/doc.xml")->documentElement->nodeName'
Document
Misdiagnosis. This works:
use LibXML;
my LibXML::Document $dom .= parse: :string(q:to<OUCH>);
<Document/><!-- comment -->
OUCH
Parsing of a file with a trailing comment:
A leading comment also causes a similar segfault.