Hi ,
Have an XML file a section of which is as below
<component>
<refentity>
<name>ABITIBI-CONSOLIDATED INC.</name>
<red>003CB6</red>
</refentity>
<bond>
<name>ABY 8.55 01Aug10</name>
<issuer>
<prospname>Abitibi</prospname>
<pairred>003CB6AA3</pairred>
<ispreferred>true</ispreferred>
</issuer>
<type>Bond</type>
<isconvert>false</isconvert>
</bond>
<red>003CB6AA3</red>
</component>
<component>
<refentity>
<name>Argentine Republic</name>
<red>PP7D7E</red>
</refentity>
<bond>
<name>ARGENT 8.28 31Dec33 Sink</name>
<type>Bond</type>
<isconvert>false</isconvert>
</bond>
</component>
The above are two <component> records. In the first one within the tag <bond> there is a tag <issuer> , in the second there is no <issuer>.
I need to write a script to seperately write all the components and bonds which have a issuer into one file and components and bonds which do not have an issuer into another file.
Any help is very much appreciated.
Thanks
Have an XML file a section of which is as below
<component>
<refentity>
<name>ABITIBI-CONSOLIDATED INC.</name>
<red>003CB6</red>
</refentity>
<bond>
<name>ABY 8.55 01Aug10</name>
<issuer>
<prospname>Abitibi</prospname>
<pairred>003CB6AA3</pairred>
<ispreferred>true</ispreferred>
</issuer>
<type>Bond</type>
<isconvert>false</isconvert>
</bond>
<red>003CB6AA3</red>
</component>
<component>
<refentity>
<name>Argentine Republic</name>
<red>PP7D7E</red>
</refentity>
<bond>
<name>ARGENT 8.28 31Dec33 Sink</name>
<type>Bond</type>
<isconvert>false</isconvert>
</bond>
</component>
The above are two <component> records. In the first one within the tag <bond> there is a tag <issuer> , in the second there is no <issuer>.
I need to write a script to seperately write all the components and bonds which have a issuer into one file and components and bonds which do not have an issuer into another file.
Any help is very much appreciated.
Thanks