![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Parsing XML file and keeping the formatting tagsby corfuitl (Sexton) |
on Mar 22, 2018 at 14:50 UTC ( #1211528=perlquestion: print w/replies, xml ) | Need Help?? |
corfuitl has asked for the wisdom of the Perl Monks concerning the following question: Hi PerlMonks I have the following bilingual file and would like to extract the source and target nodes preserving its xml elements they might have as well as the line breaks. Could you please help me on that? I have no experience in xml parsing with Perl. Here is a sample of my file:
The expected result should be: Hello <x id=1/> world! <lb/> How are you? || Ciao<x id=1/> mondo! <lb/> Come stai? Thank you for your time!
Back to
Seekers of Perl Wisdom
|
|