<?xml version="1.0"?>
<data>
<header>
<name>Red Obligation Download 2</name>
<version>1.1a</version>
<date>2004-08-03</date>
</header>
<bond>
<name>NBR-Inc 0 05Feb21</name>
<issuer>
<name>Nabors Industries, Inc.</name>
<red>68BEBEAA0</red>
<updated>2004-03-31</updated>
</issuer>
<type>Bond</type>
<isconvert>true</isconvert>
<isperp>false</isperp>
<coupontype>Fixed</coupontype>
<tier>SNRFOR</tier>
<ccy>USD</ccy>
<maturity>2021-02-05</maturity>
<coupon>0</coupon>
<originalisin>US629568AF37</originalisin>
<isin>US629568AF37</isin>
<cusip>629568AF3</cusip>
<updated>2004-03-31</updated>
</bond>
<bond>
<name>FORTIS-FinNV 4.625 07Apr09</name>
<issuerfromprospectus>Fortis Finance N.V.</issuerfromprospectus>
<guarantor>
<name>Fortis (B) S.A./N.V.; Fortis (NL) N.V.</name>
<red>37DEKHAA6</red>
<updated>2004-02-20</updated>
</guarantor>
<guarantor>
<name>Fortis (B) S.A./N.V.; Fortis (NL) N.V.</name>
<red>37DEKKAA9</red>
<updated>2004-02-16</updated>
</guarantor>
<type>Bond</type>
<isconvert>false</isconvert>
<isperp>false</isperp>
<coupontype>Fixed</coupontype>
<tier>SNRFOR</tier>
<ccy>EUR</ccy>
<maturity>2009-04-07</maturity>
<coupon>0.04625</coupon>
<originalisin>XS0096324925</originalisin>
<isin>XS0096324925</isin>
<cusip>N3340HAE0</cusip>
<updated>2004-02-20</updated>
</bond>
<bond>
<name>WOWAU Frn 20Aug07</name>
<issuer>
<name>Woolworths Limited</name>
<red>9H88GGAA4</red>
<updated>2004-02-13</updated>
</issuer>
<type>Bond</type>
<isconvert>false</isconvert>
<isperp>false</isperp>
<coupontype>Float</coupontype>
<tier>SNRFOR</tier>
<ccy>AUD</ccy>
<maturity>2007-08-20</maturity>
<coupon>0</coupon>
<originalisin>AU000WW20022</originalisin>
<isin>AU000WW20022</isin>
<updated>2004-02-13</updated>
</bond>
Hi,
Thats an example of an XML file I have. I need to strip all the tags and get the data in a comma sererated file. I have done a simple xml extraction, but in this file as you can see the tags may or may not exist.
Like on the first and third instances the tag <issuer> comprises of <name>, <red> and <updated> but on the second instance there is <IssuerFromPropectus> and <guarantor>. And here Gurantor has nested tags.
So you see the tags are not fixed, and the numbe of tags on each instance can vary, but on the csv file I would like the same number of columns for every record.
So if a tag does not exist I will still output the de-limiter.
Any help appreciated,
Thanks
<data>
<header>
<name>Red Obligation Download 2</name>
<version>1.1a</version>
<date>2004-08-03</date>
</header>
<bond>
<name>NBR-Inc 0 05Feb21</name>
<issuer>
<name>Nabors Industries, Inc.</name>
<red>68BEBEAA0</red>
<updated>2004-03-31</updated>
</issuer>
<type>Bond</type>
<isconvert>true</isconvert>
<isperp>false</isperp>
<coupontype>Fixed</coupontype>
<tier>SNRFOR</tier>
<ccy>USD</ccy>
<maturity>2021-02-05</maturity>
<coupon>0</coupon>
<originalisin>US629568AF37</originalisin>
<isin>US629568AF37</isin>
<cusip>629568AF3</cusip>
<updated>2004-03-31</updated>
</bond>
<bond>
<name>FORTIS-FinNV 4.625 07Apr09</name>
<issuerfromprospectus>Fortis Finance N.V.</issuerfromprospectus>
<guarantor>
<name>Fortis (B) S.A./N.V.; Fortis (NL) N.V.</name>
<red>37DEKHAA6</red>
<updated>2004-02-20</updated>
</guarantor>
<guarantor>
<name>Fortis (B) S.A./N.V.; Fortis (NL) N.V.</name>
<red>37DEKKAA9</red>
<updated>2004-02-16</updated>
</guarantor>
<type>Bond</type>
<isconvert>false</isconvert>
<isperp>false</isperp>
<coupontype>Fixed</coupontype>
<tier>SNRFOR</tier>
<ccy>EUR</ccy>
<maturity>2009-04-07</maturity>
<coupon>0.04625</coupon>
<originalisin>XS0096324925</originalisin>
<isin>XS0096324925</isin>
<cusip>N3340HAE0</cusip>
<updated>2004-02-20</updated>
</bond>
<bond>
<name>WOWAU Frn 20Aug07</name>
<issuer>
<name>Woolworths Limited</name>
<red>9H88GGAA4</red>
<updated>2004-02-13</updated>
</issuer>
<type>Bond</type>
<isconvert>false</isconvert>
<isperp>false</isperp>
<coupontype>Float</coupontype>
<tier>SNRFOR</tier>
<ccy>AUD</ccy>
<maturity>2007-08-20</maturity>
<coupon>0</coupon>
<originalisin>AU000WW20022</originalisin>
<isin>AU000WW20022</isin>
<updated>2004-02-13</updated>
</bond>
Hi,
Thats an example of an XML file I have. I need to strip all the tags and get the data in a comma sererated file. I have done a simple xml extraction, but in this file as you can see the tags may or may not exist.
Like on the first and third instances the tag <issuer> comprises of <name>, <red> and <updated> but on the second instance there is <IssuerFromPropectus> and <guarantor>. And here Gurantor has nested tags.
So you see the tags are not fixed, and the numbe of tags on each instance can vary, but on the csv file I would like the same number of columns for every record.
So if a tag does not exist I will still output the de-limiter.
Any help appreciated,
Thanks