hi, yes I did see that first_child_matches were wrong choice
however, when I use child_matches, I get undesirable results
Can't call method "att" on an undefined value at ././././xml_t line 64
+.
yes
[root@xmen script]#
I think it's looping over more than necessary??
shouldn't it enter below if statement, ONLY when it has element 'get_this'??
for my $para ( $root->children('para') ) {
if ( $para->child_matches('get_this') ) {
print $para->first_child('get_this')->att('value');
}
}
**UPDATE**
I tried descendent and works for me.. thank you!!!
|