#!/usr/bin/perl use strict; use warnings; use XML::XPath; my $xpob = XML::XPath->new('xml' => ' 1234 Box Suitcase '); my @itmz = $xpob->findnodes('//Item'); # retn nodez in doc ordr print $itmz[1]->getChildNode(1)->getValue(); # XPath indices are 1-based # ... so the abov line takes the 2nd elem (Bcuz Perl is 0-based) # && traverses down to its 1st child-node (this time no more nested elemz # but just a TextNode as the only child) to print that value: "Suitcase"