open file.xml ; for /DatatoParse/elt/Nest1/elt/Nest2/elt { my $top = ancestor::elt[last()] ; echo :s $top/d1 , $top/d2 , (d5/X) , (d5/Y) , (d6/X) , (d6/Y) , (N +est3/Nest4/d7/d9/d10/d11) ; }
Output:
TV show 1,Heroes,-2,-3,5,8,yipppeee TV show 1,Heroes,-2,-3,5,8,yipppeee TV show 1,Heroes,-2,-3,5,8,yipppeee TV show 1,Heroes,-2,-3,5,8,yipppeee TV show 2,Prison Break,-2,-3,5,8,yipppeee TV show 2,Prison Break,-2,-3,5,8,yipppeee TV show 2,Prison Break,-2,-3,5,8,yipppeee TV show 2,Prison Break,-2,-3,5,8,yipppeee TV show 4,Alias,-2,-3,5,8,yipppeee TV show 4,Alias,-2,-3,5,8,yipppeee TV show 4,Alias,-2,-3,5,8,yipppeee TV show 4,Alias,-2,-3,5,8,yipppeee
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: Parsing a highly nested XML file correctly and efficiently
by choroba
in thread Parsing a highly nested XML file correctly and efficiently
by Ppeoc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |