use strict; use warnings; use XML::XPath; my $stream = qq{ N Y 3-D Secure ... }; my $xp = XML::XPath->new(xml => $stream); $xp->set_namespace('a',"http://namespace2"); $xp->set_namespace('i',"http://www.w3.org/2001/XMLSchema-instance"); print "AuthStatus\t", $xp->getNodeText('//ProcessSetupResponse/ProcessSetupResult/i:AuthenticatedStatus'), "\n"; print "AuthStatus\t", $xp->getNodeText('//ProcessSetupResponse/ProcessSetupResult/a:AuthenticatedStatus'), "\n";