Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 wandering the Monastery: (8)
As of 2017-04-24 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (447 votes). Check out past polls.