in reply to Parsing an XML file with an undefined value
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"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing an XML file with an undefined value
by ravishi (Acolyte) on Nov 12, 2008 at 19:25 UTC | |
by Anonymous Monk on Jun 21, 2017 at 18:49 UTC | |
by Anonymous Monk on Jun 21, 2017 at 19:07 UTC |