Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Fetch particular xml message from log

by poj (Prior)
on Sep 12, 2013 at 07:52 UTC ( #1053668=note: print w/replies, xml ) Need Help??

in reply to Fetch particular xml message from log

#!perl use strict; use XML::Twig; my $xml = q!<xml><test> <name> 111 </name><book> 234 </book> </test><test> <name> 111 </name><book> abc </book> </test></xml>!; my $t = XML::Twig->new( twig_handlers => {'test/book[string()=~/abc/]'=> \&book} ); $t->parse($xml); sub book { my($t,$book) = @_; $book->parent->print; print "\n"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1053668]
[Corion]: But I could create that temporary table in the module and use it for the improved perfomance directly instead.
[Corion]: And the question is, what would be better/preferred ;-)
[Corion]: Hmm - not exactly like the ROLLUP command. Ah well.
[hippo]: Make it an option?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-02-23 15:30 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (347 votes). Check out past polls.