Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2018-02-22 20:57 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (299 votes). Check out past polls.