use strict; use warnings; use XML::LibXML; use XML::LibXML::XPathContext; # load the XML doc my $p = XML::LibXML->new; my $xml_file = do { local $/; }; my $dom = $p->parse_string( $xml_file ); # register the namespace my $xc = XML::LibXML::XPathContext->new( $dom ); $xc->registerNs('ns', 'http://www.w3.org/2005/Atom'); # select using XPath my @nodes = $xc->findnodes( '/ns:feed/ns:entry'); print $_->toString for @nodes; __DATA__ 233 1 233 34 1 Decision making: Marmite A meeting of the 'business group', which is the committee set up to steer the development of the new Squeezy Marmite bottle. They discuss the qualities of the new bottle and agree to test i t with consumers. 36145156 2007-09-07 assets/asset10000/aaiiaaaaaaafnknn.mpg C4L Secondary Service