note
choroba
It's not clear what output you expect.<P>
Something like this?
<c>
for my $tu ($dom->findnodes('/tmx/body/tu')) {
for my $child ($tu->findnodes('*')) {
( my $text = $child->textContent ) =~ s,\n, <lb/> ,g;
print $text, "\t";
}
print "\n";
}
__END__
no no Hello <lb/> world! Bonjour <lb/> monde
yes no no Hello <lb/> world! Bonjour <lb/> monde
</c><P>
Or do you want a table of all the prop types?
<c>
use feature qw{ say };
use List::Util qw{ uniq };
my @headers = sort +uniq(map $_->value,
$dom->findnodes('/tmx/body/tu/prop/@type'));
for my $tu ($dom->findnodes('/tmx/body/tu')) {
my %props;
for my $prop ($tu->findnodes('prop')) {
$props{ $prop->findvalue('@type') } = $prop->textContent;
}
print join("\t", map $_ // "", @props{@headers}), "\t";
for my $child ($tu->findnodes('tuv')) {
( my $text = $child->textContent ) =~ s,\n, <lb/> ,g;
print $text, "\t";
}
print "\n";
}
__END__
aligned client corrected domain project subject
no no Hello <lb/> world! Bonjour <lb/> monde
no no yes Hello <lb/> world! Bonjour <lb/> monde
</c>
</c><P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-832495">
<c>($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,</c>
</div></div><!-- Wiki2Monks {"version":1.142} -->
1218247
1218247