Help for this page
# LibXML lingo; XPath expr is off the cuff, untested $doc->findvalue('/section[last()]/title[1]/@num');
$doc->root(sub { $_->last_child( 'section', sub { ... }) }) });