Hello ladies and gents
I'm a newbie in perl and i wan't to sove the following task in perl (think would be the best)
Description: I have several files which are called textA.xml and textB.xml, textC.xml and so on (same location)
Now: i have to parse these files and search for block1 and block2. It is possible, that block1 is several times in the file and no block2 and other way round. If one or more of block1 or block2 exists (in each file), i have to add specific lines (line1 belongs to block1 and line2 belongs to block2) under the last line of the specific block.
block1:
<hello>Y</hello>
<gaga>sas</gaga>
<bla>no</bla>
block2
<hello>N</hello>
<gugus>asd</gugus>
line1:
<include>y</include>
<string></string>
line2:
<exclude>n</exclude>
<test>match</test>
I hope, that my question is not to weird
Thank you in forward,
xenia
I'm a newbie in perl and i wan't to sove the following task in perl (think would be the best)
Description: I have several files which are called textA.xml and textB.xml, textC.xml and so on (same location)
Now: i have to parse these files and search for block1 and block2. It is possible, that block1 is several times in the file and no block2 and other way round. If one or more of block1 or block2 exists (in each file), i have to add specific lines (line1 belongs to block1 and line2 belongs to block2) under the last line of the specific block.
block1:
<hello>Y</hello>
<gaga>sas</gaga>
<bla>no</bla>
block2
<hello>N</hello>
<gugus>asd</gugus>
line1:
<include>y</include>
<string></string>
line2:
<exclude>n</exclude>
<test>match</test>
I hope, that my question is not to weird
Thank you in forward,
xenia