I have an xml file , a sample of which is as below.
<?xml version="1.0"?>
<data>
<header>
<name>Red Entity Download 2</name>
<version>1.1a</version>
<date>2004-07-27</date>
</header>
<entity>
<name>Democratic and Popular Republic of Algeria</name>
<shortname>Dem & Pop Rep Algeria</shortname>
<ticker>ALGERI</ticker>
<yourentity>1225</yourentity>
<red>VZ5ACN</red>
<cusip>V4193K</cusip>
<type>Sov</type>
<jurisdiction>Algeria</jurisdiction>
<liquidity>Low</liquidity>
</entity>
<entity>
<name>Argentine Republic</name>
<shortname>Argentine Rep</shortname>
<ticker>ARGENT</ticker>
<yourentity>849</yourentity>
<red>PP7D7E</red>
<cusip>P0761D</cusip>
<type>Sov</type>
<jurisdiction>Argentina</jurisdiction>
<liquidity>Low</liquidity>
<updated>1999-04-07</updated>
</entity>
</data>
I m trying to get a 'comma seperated file' out of this which shld look like
Democratic and Popular Republic of Algeria,Dem & Pop Rep Algeria ,ALGERI , 1225, VZ5ACN, V4193K, Sov ,Algeria,Low
Argentine Republic,Argentine Rep,ARGENT, 849, PP7D7E, P0761D, Sov, Argentina,Low, 1999-04-07
So basically, the entire record is between the tags <entity> and </entity>
Any pointers folks.
Thanks .
<?xml version="1.0"?>
<data>
<header>
<name>Red Entity Download 2</name>
<version>1.1a</version>
<date>2004-07-27</date>
</header>
<entity>
<name>Democratic and Popular Republic of Algeria</name>
<shortname>Dem & Pop Rep Algeria</shortname>
<ticker>ALGERI</ticker>
<yourentity>1225</yourentity>
<red>VZ5ACN</red>
<cusip>V4193K</cusip>
<type>Sov</type>
<jurisdiction>Algeria</jurisdiction>
<liquidity>Low</liquidity>
</entity>
<entity>
<name>Argentine Republic</name>
<shortname>Argentine Rep</shortname>
<ticker>ARGENT</ticker>
<yourentity>849</yourentity>
<red>PP7D7E</red>
<cusip>P0761D</cusip>
<type>Sov</type>
<jurisdiction>Argentina</jurisdiction>
<liquidity>Low</liquidity>
<updated>1999-04-07</updated>
</entity>
</data>
I m trying to get a 'comma seperated file' out of this which shld look like
Democratic and Popular Republic of Algeria,Dem & Pop Rep Algeria ,ALGERI , 1225, VZ5ACN, V4193K, Sov ,Algeria,Low
Argentine Republic,Argentine Rep,ARGENT, 849, PP7D7E, P0761D, Sov, Argentina,Low, 1999-04-07
So basically, the entire record is between the tags <entity> and </entity>
Any pointers folks.
Thanks .