I have to parse following XML:
<reply xmlns="urn::ietf::param" xmlns:element="https://xml.example.net/abc/12.3"
message-id='1'>
<abc>
<xyz> hello </xyz>
</abc>
</reply>
I want the value of xyz node i.e. hello, but findnodes is returning null value. my code is :
my $xpath=XML::LibXML::XPathContext->new($dom);
$xpath->registerNs('ns1','urn::ietf::param');
$xpath->registerNs('ns2','https://xml.example.net/abc/12.3');
$val=$xpath->findnodes('//ns1:reply/ns2:element/abc/xyz');
print $val;
but print statement is returning null value