kmatishak
Programmer
- Feb 2, 2009
- 1
Hi,
I've got an XML file that I run through a Perl script that uses the XML Parser. I need to be able to exclude certain blocks of XML based on one of the tag values in the block. For example, my input file has the following:
<customBucket></customBucket>
<customDimensionName>Strategy</customDimensionName>
<customBucketValueString>Test Strategy</customBucketValueString>
<customBucketEnd></customBucketEnd>
<customBucket></customBucket>
I want to be able to exclude all of the above lines in my output file based on the value of customDimensionName (eg. if the value is "Strategy", then exclude everything between and including the customBucket start/end tags)
Is there an easy way of doing this in Perl?
Thanks!
I've got an XML file that I run through a Perl script that uses the XML Parser. I need to be able to exclude certain blocks of XML based on one of the tag values in the block. For example, my input file has the following:
<customBucket></customBucket>
<customDimensionName>Strategy</customDimensionName>
<customBucketValueString>Test Strategy</customBucketValueString>
<customBucketEnd></customBucketEnd>
<customBucket></customBucket>
I want to be able to exclude all of the above lines in my output file based on the value of customDimensionName (eg. if the value is "Strategy", then exclude everything between and including the customBucket start/end tags)
Is there an easy way of doing this in Perl?
Thanks!