If I understand what you want then adding:
my $type = $_->att ('type'); return unless defined $type && $type eq 'AdditionalReference2';
following the my @path; line in showNesting does the trick and (for the sample data I used above) prints:
semt.002.001.01.PrvsRef semt.002.001.01.RltdRef
In reply to Re^3: perl parsing xml
by GrandFather
in thread perl parsing xml
by thickice97
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |