May 15, 2016, 5:00 PM
Post #2 of 3
You need to adjust the xpath query provided to findnodes, possibilities:
Re: [cognizant] Perl code enhancement
[In reply to]
# select line2 and line3 elements of all line elements.
$twig->findnodes('//line/line2 | //line/line3')
# select all child elements of all line elements.
How you implement this change to cover all scenarios and retain genericity is your decision. Perhaps an array of xpath queries to run against your filter, assuming the filter doesn't vary per xpath query.
(This post was edited by Zhris on May 15, 2016, 5:05 PM)