corfuitl has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
I have the XML file
<seg><foo mid="0" mtype="seg"><g id="1">Need to export this text</g></foo></seg>and I would like to get the text with its XML tags (i.e. <g id="1">Need to export this text</g>
for my $foo ($seg->findnodes('foo')) { my $mid = ($foo->findvalue('@mid')); my $mrktext = ($foo->findnodes('text()')); print "$mid $mrktext\n"; }
I use this but it doesn't export any text.
Back to
Seekers of Perl Wisdom