use strict; use warnings; use XML::XPath; my $xml = q| Robert A+ |; my $xp = XML::XPath->new(xml => $xml); my $nodeset = $xp->find('/descendant-or-self::comment()'); foreach my $node ($nodeset->get_nodelist) { print "FOUND\n", $node->getValue, "\n"; } #### FOUND A single line comment FOUND A comment deeply inside the file FOUND Here starts a multi line comment Lenard A-