use XML::LibXML::XPathContext qw( ); my $xpc = XML::LibXML::XPathContext->new(); $xpc->registerNs('nc', 'urn:ietf:params:xml:ns:netconf:base:1.0'); $xpc->registerNs('j', 'http://xml.juniper.net/junos/12.3R9/junos'); #### $xpc->findnodes( "/nc:rpc-reply/nc:vlan-information/nc:vlan", $doc) $xpc->findnodes( "nc:vlan-name|nc:vlan-tag|.//nc:vlan-member-interface", $vlan)