Help for this page
<a> <b id='id1' type="1"/> <b id='id2' type="1.5"/> ... <c id='id4'/> <b id='id5' type="3"/> </a>
use warnings; use strict; use XML::XPath; ... foreach my $node ( $nodeset->get_nodelist ) { print XML::XPath::XMLParser::as_string( $node ) . "\n"; }