use 5.010; use lib "lib"; use HTML::HTML5::DOM; use HTML::HTML5::Parser; my $dom = XML::LibXML->load_xml(IO => \*DATA); XML::LibXML::Augment->rebless($dom); my $impl = HTML::HTML5::DOM->getDOMImplementation; say $dom->getElementsByTagName('p')->[0]->textContent if $impl->hasFeature(XMLVersion => '1.1'); say sprintf("%s: %s", $_->nodeName, $_->_p5_numericPath) for $dom->getElementsByTagName('*'); say sprintf("%s: %s", $_->nodeName, $_->_p5_numericPath) for $dom->childNodes; __DATA__ Greetings

Hello, world!