Q:

xml::Twig handles

is it possible to  tell the xml::twig handle to to parse only non nested tags?
i.e for example is it possible with the below code to proccess tag1,tag2,tag3 under the same handler and treat tag4 on differnet handler or i need handler for every tag
<tags>
<start>
<tag1> a <\tag1>
<tag2> a <\tag2>
<tag3> a <\tag3>
<tag4 att=2>
   <tag6> a <\tag6>
   <tag7> a <\tag7>
<\tag4>
<\start>
<start>
...
<\start>
..
<\tags>

my $t = XML::Twig->new(
twig_handlers => { 'tag1 tag2 tag3' => \&handler1 
                    'tag4' => \&handler2

});

I mean if its possible to differ between nested and non nested tag ?

A:

I'm not sure if this is what you're looking for, but if you just want to use the same handler for different tags, you should be able to do this:
twig_handlers => {
    'tag1' => \&handler1,
    'tag2' => \&handler1,
    'tag3' => \&handler1,
    'tag4' => \&handler2
}

