in reply to Creating context-specific handlers in XML::Twig
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creating context-specific handlers in XML::Twig
by bobf (Monsignor) on Nov 09, 2007 at 05:17 UTC |