I say he needs to prove it :)
#!/usr/bin/perl --
use strict;
use warnings;
use HTML::Parser;
my $p = HTML::Parser->new(
api_version => 3,
default_h => [sub{print join ' | ', grep defined, @_,"\n" },"event
+,tag,text,"],
# strict_names => 1,
xml_mode => 1,
);
$p->parse(
'<boo><foo><shoo><Moo><COW></BOO>
<html><body>hi <br> <a href="1"> hello </a>
<boo><foo><shoo><Moo><COW></BOO>
</body></html>'
);
__END__
start_document | |
start | boo | <boo> |
start | foo | <foo> |
start | shoo | <shoo> |
start | Moo | <Moo> |
start | COW | <COW> |
end | /BOO | </BOO> |
text |
|
start | html | <html> |
start | body | <body> |
text | hi |
start | br | <br> |
text | |
start | a | <a href="1"> |
text | hello |
end | /a | </a> |
text |
|
start | boo | <boo> |
start | foo | <foo> |
start | shoo | <shoo> |
start | Moo | <Moo> |
start | COW | <COW> |
end | /BOO | </BOO> |
text |
|
end | /body | </body> |
end | /html | </html> |
Google suggests its xmllint that complaining. |