|
Hi,
I have trying to get last child of an element using twig object by,
@last_tg=$t->get_xpath(tbody/row[last()]/entry);
its work well, but I need it in twig handler potion as
my $t = new XML::Twig ( twig_handlers =>
{'tbody/row[last()]/entry'
=> sub {$_->set_att('aid5:cellstyle'=>'TBL')} );
but it shows error like 'unrecognized expression in handler', is it possible using the 'last()' xpath function here? give me an idea for how I can get last child of an element through Twig Handler.
Thanks in advance. |