0

I try to get the node value using LibXML,

Returns below log:

Use of uninitialized value $long_name in concatenation (.) or string at validate.0.1.pl line 105, <FILEHD> line 1.
###LI### 11 node_ln is: <annotation source="Name" xml:lang="EN">TestValue</annotation> and long_name is .

Script:

use XML::LibXML;
....
for my $node_ln ($xpc->findnodes( qq(.//xsd:annotation[\@source=\"Name\"]), $node_root)){
    my $long_name = $node_ln->nodeValue;
    print("###LI### 11 node_ln is: $node_ln and long_name is $long_name.\n");
}

Scratching my head now on how to get the node value 'TestValue', any suggestion? Thank you all!

ikegami
  • 367,544
  • 15
  • 269
  • 518
dellair
  • 427
  • 4
  • 22

0 Answers0