Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: XML Parsing

by remiah (Hermit)
on Sep 22, 2012 at 01:32 UTC ( #995019=note: print w/replies, xml ) Need Help??


in reply to Re: XML Parsing
in thread XML Parsing

With Twig.

my $twig=XML::Twig->new( twig_handlers =>{ #'//*[total="609" and passed="609"]' =>sub { # i wonder why th +is doesn't work..? '//*[@total="609"]' =>sub { my ($twig,$elt)=@_; last if ( $elt->att("passed") ne "609"); last if ( $elt->att("skipped") ne "0"); last if ( $elt->att("blocked") ne "0"); if ($elt->parent->gi eq 'workflow' ){ $elt->parent->print; } } }, PrettyPrint=>'indented', )->parsefile('xml_without_error.xml');

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995019]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2017-02-22 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (338 votes). Check out past polls.