for my $attr_node ( reverse $xc->findnodes('//post:entry/post:category/@term') ) { my $attr_val = $attr_node->getValue(); ... }