for my $entry ($doc->getElementsByTagName('Entry')) { FIELD: for my $field (qw(test1 test2 test3 test4 test5)) { my $test = $entry->getElementsByTagName( $field )->item(0); if (not $test) { warn "No item found for tag $field\n"; next FIELD; } warn "Node Value for $field => " . $text->getFirstChild->getNo +deValue . "\n"; } }
In reply to Re: Parsing an XML file with an undefined value
by Herkum
in thread Parsing an XML file with an undefined value
by ravishi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |