Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: finding ancestor elements related to specific change

by BrowserUk (Pope)
on Oct 18, 2012 at 00:44 UTC ( #999636=note: print w/ replies, xml ) Need Help??


in reply to finding ancestor elements related to specific change

#!/usr/bin/perl -slw use strict; use Data::Dump qw(dump pp); use XML::Simple qw(:strict); my $xml = XMLin( \*DATA, ForceArray => ['parameters','members','declar +ation_name'], KeyAttr => 0 ); #pp $xml; $_->{ kind } eq 'function' and grep{ $_->{ type } eq 'uint64_t' } @{ $_->{ parameters } } and print $_->{name} for @{ $xml->{public_methods}{members} }; __DATA__ <classes name="Panoply::BAR"> <public_methods> <members name="BAR" const="no" kind="function" protection="pub +lic" static="no" virtualness="non_virtual" volatile="no"> <parameters declaration_name="pciReg" type="Register::Ptr" + /> </members> <members name="bits" const="no" kind="function" protection="pu +blic" static="no" type="void" virtualness="non_virtual" volatile="no" +> <parameters declaration_name="value" type="uint64_t" /> </members> <members name="subBitVector" const="no" kind="function" protec +tion="public" static="no" type="void" virtualness="non_virtual" volat +ile="no"> <parameters declaration_name="value" type="const BitVector + &amp;" /> </members> </public_methods> <enums> <members name="ObjectState" kind="enum" protection="public" st +atic="no" virtualness="non_virtual"> <values name="NEW"> </values> <values name="REFRESHED"> </values> <values name="DIRTY"> </values> </members> </enums> </classes>

Prints bits


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


Comment on Re: finding ancestor elements related to specific change
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-12-21 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls