AhmedABdo has asked for the wisdom of the Perl Monks concerning the following question:
I have a big XML file, in this file I have for example this tag,
<Validation byCluster="true" byOtherPop="false" byHapMap="true" by1000G="true">
--------------------
The result should be: byCluster, byHapMap, by1000G
or this
<Validation bySASH="true" byOtherPop="true" byHapMap="true" by1000G="false">
--------------------
The result should be: bySASH, byOtherPop, byHapMap
========================
I want to print just the attributes "not their values" that have "true" as a value and ignore the attributes that have "false" as a value
I am using perl and twig::XML to extract these information.
I do not know even how to start because If I want the values, it would be easy, but have no information about how to print the attributes
Any advices about how to solve this
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print specific attributes "not their values" of an XML file using Perl
by toolic (Bishop) on Sep 11, 2015 at 18:09 UTC | |
|
Re: Print specific attributes "not their values" of an XML file using Perl
by runrig (Abbot) on Sep 11, 2015 at 18:08 UTC | |
|
Re: Print specific attributes "not their values" of an XML file using Perl
by choroba (Cardinal) on Sep 11, 2015 at 22:47 UTC |