in reply to Re^8: how does XML::DOM load XML?
in thread how does XML::DOM loadXML?

but $value->getNodeValue is not returning me value

But in the example XML that you gave, none of the nodes have a value. So of course $value->getNodeValue will return "undef".

Also I've just spotted this:

$report .=qq|<strong>$value->getNodeValue </strong> <br>|;

Function (and method) calls don't interpolate in double-quoted strings.

Oh, and my name isn't "Chip". That's someone else completely.

Replies are listed 'Best First'.
Re^10: how does XML::DOM load XML?
by ashwani (Initiate) on Jan 24, 2007 at 10:17 UTC
    oops..i guess its dave..
    thanks A lot for your warm help
    well... i have solved my problem and giving solution here.
    foreach my $value(@child) { my $val=$value->getChildNodes; if($value->getNodeName eq "Name") { $report .="<strong>".$val->item(0)->getNodeValue ."</strong><br>"; } }
    basically $value type is element so to get value we have to take child first
    then its value in at what position you want or can run in loop.
    i needed at 0 so din't use loop but some other one can take loop here.
    thanks again for you help..
    ashwani