- or download this
foreach my $child ($obj->children()) {
next unless $child->name eq 'paragraph';
# code goes here
}
- or download this
foreach my $child ($obj->children()) {
next unless $child->name eq 'page';
foreach my $grandchild ($child->children()) {
...
# code goes here
}
}
- or download this
foreach my $para ($obj->match('paragraph')) {
# code goes here
}
- or download this
foreach my $header ($obj->match('/page/header')) {
# code goes here
}