corfuitl has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks
I have the following problem to solve and need your help!
I have two XML files (that should be identical but not always) and I would to extract some values and align them.
My XML files look like this:
<file original="File_1.xml"> <body> <unit id="id1"> <title>Part 1_file1</title> </unit> <unit id="id2"> <title>Part 2</title> </unit> </body> </file> <file original="File_2.xml"> <body> <unit id="id1"> <title>Part 1</title> </unit> </body> </file>
I would like to align them in this way:
File_1.xml id1 title_value_from_first_xml title_value_from_se +cond_xml File_1.xml id2 title_value_from_first_xml title_value_from_se +cond_xml File_2.xml id1 title_value_from_first_xml title_value_from_se +cond_xml
Any suggestions?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parsing two XML at the same time and align them
by choroba (Cardinal) on May 17, 2018 at 12:00 UTC | |
by corfuitl (Sexton) on May 18, 2018 at 15:48 UTC | |
by haukex (Archbishop) on May 19, 2018 at 17:32 UTC | |
Re: Parsing two XML at the same time and align them
by Discipulus (Canon) on May 17, 2018 at 11:49 UTC | |
Re: Parsing two XML at the same time and align them
by james28909 (Deacon) on May 17, 2018 at 19:11 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom