How can I tell XML::Twig to ignore UML::TaggedValue tags in Classes, handle them one way in Attributes, and handle them a different way if they are not in either Classes or Attributes?
Ignoring them is just a question of handling them by doing nothing. So you really only set a twig_handler to look at UML:TaggedValue elements, and within that, use the path method to look at your ancestor chain to determine whether you unleash the Attributes treatment or else the not_a_Class treatment.
Is that enough for you to get going or do you need a snippet?
• another intruder with the mooring in the heart of the Perl
In reply to Re: Creating context-specific handlers in XML::Twig
by grinder
in thread Creating context-specific handlers in XML::Twig
by bobf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |