Skip Menu |

This queue is for tickets about the XML-XPath CPAN distribution.

Report information
The Basics
Id: 90850
Status: resolved
Priority: 0/
Queue: XML-XPath

People
Owner: MANWAR [...] cpan.org
Requestors: javibarroso [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.16
Fixed in: 1.17



Subject: getNodeText returns an XML::XPath::Literal and not a string
Please clarify it in manpage. Thank you very much With next text you can see what I'm saying: #!/usr/bin/perl use strict; use XML::XPath; use Data::Dumper; my $test; my $xp = XML::XPath->new(ioref => *DATA); my @nodes=$xp->findnodes('/A'); #for my $n ($root->get_nodelist) for my $n (@nodes) { my $result=XML::XPath->new(context=>$n); my $id=$result->getNodeText('@id')->value; # without -> value, dumper prints a Literal object print Dumper $id,"\n"; } __DATA__ <A id="a"> </A>
Resolved.