my $xpc = XML::LibXML::XPathContext->new( $doc ); $xpc->registerNs( ota => 'http://www.opentravel.org/OTA/2003/05' ); my @options = $xpc->findnodes('//ota:OriginDestinationOption'); #### # Doesn't work because OriginDestinationOption belong to # the http://www.opentravel.org/OTA/2003/05 NS, not the # null NS. my $root = $doc->documentElement(); my @opts = $root->findnodes("//OriginDestinationOption"); #### # Doesn't work because OriginDestinationOption element # appears as , rather than # my $root = $doc->documentElement(); my @opts = $root->findnodes("//ota:OriginDestinationOption"); #### my $root = $doc->documentElement(); my @opts = $root->findnodes("//*[name()="OriginDestinationOption"]');