http://www.perlmonks.org?node_id=1116094


in reply to XML::Rules Parsing Order

If you have start rules, then parent_tag would be parsed first, and attributes (but not other contents) of the parent tag would be available in the rule. With regular rules as you have, the end tag must be parsed before the rule is invoked so that both the attributes and contents of the tag are available in the rule, therefore the child_tag rules of each parent will be invoked before each parent tag.