in reply to Re^2: XML parsing problem
in thread XML parsing problem
And what would an XML-thread be without the third blind mouse; XML::LibXML.
use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file("query.xml"); for my $query ( $doc->findnodes("//queries/query") ) { for my $kid ( $query->findnodes("*") ) { printf("%10s : %s\n", $kid->getName, $kid->textContent ); } print "\n"; }
|
|---|