Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2016-10-28 13:21 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (383 votes). Check out past polls.