get nodevalue is not returning any value and giving exception thatmy $doc=XML::DOM::Document->new; my $parser=XML::DOM::Parser->new; $doc=$parser->parse($output); my $root=$doc->getDocumentElement; if ($root->hasChildNodes()) { my @children = $root->getChildNodes; foreach my $node(@children) { print $node->getNodeName; if( $node->getNodeName eq "Result") { my @child=$node->getChildNodes; foreach my $value(@child) { if($value->getNodeName eq "Name") { $report .=qq|<strong>$value->getNodeValue </st +rong> <br>|; my $val=$value->getNodeValue; print $val; } } } }
it means it is telling that this is element but if it element then how it returning getnodename.Can't locate object method "getnodevalue" via package "XML::DOM::Eleme +nt"
can you help me to read this<myxml> <result> <name></name> <address></address> <phone></phone> </result> <result> <name></name> <address></address> <phone></phone> </result> </myxml>
In reply to Re^6: how does XML::DOM load XML?
by ashwani
in thread how does XML::DOM loadXML?
by ashwani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |