#!/usr/bin/perl use strict; use warnings; use XML::LibXML; my $parser = XML::LibXML->new; my $doc = $parser->parse_file( "org1.xml" ); my $xpath = XML::LibXML::XPathContext->new( $doc ); for my $node ( $xpath->findnodes( '//Amount' )) { print $node->textContent, "\n"; }