If you try that code you will see that it does preserve the ordering. While XML::Rules does use hashes most of the time, it' really up to you what data do you need to preserve from what tag and how. Using that code the <tweak> tags' data end up in the array referenced by $_[1]->{_content} within the rule specified for the <tcf> tag. How are the data from a tag available within the $attr hashref of the parent tag depends on the tag's rule.
In reply to Re^3: XML::Twig replace method behaving counter-intuitively
by Jenda
in thread XML::Twig replace method behaving counter-intuitively
by Human
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |