Hi ,
I m relatively sure people have done this before but I couldnt find any pointers on Google. The issue is I have a xml data file with all kinds of tags, a sample is as below
<ROWSET>
<ROW>
<DOCID> 91000 </DOCID>
<SUBJECT> Bond Inserted</SUBJECT>
<TYPE> PROBLEM </TYPE>
<CONTENT_TYPE> TEXT/PLAIN </CONTENT_TYPE>
<STATUS> PUBLISHED </STATUS>
<CREATION_DATE> 14-DEC-1999 </CREATION_DATE>
<LAST_REVISION_DATE> 05-JUN-2000 </LAST_REVISION_DATE>
<LANGUAGE> USAENG </LANGUAGE>
</ROW>
<ROW>
<DOCID> 92000 </DOCID>
<SUBJECT> Bond Updated </SUBJECT>
<TYPE> PROBLEM </TYPE>
<CONTENT_TYPE> TEXT/PLAIN </CONTENT_TYPE>
<STATUS> PUBLISHED </STATUS>
<CREATION_DATE> 04-DEC-2003 </CREATION_DATE>
<LAST_REVISION_DATE> 14-DEC-2003 </LAST_REVISION_DATE>
<LANGUAGE> USAENG </LANGUAGE>
</ROW>
</ROWSET>
I need a script which can extract all the data in a comma seperated file so for the above two records I would have
91000,Bond Inserted,Problem,Text/plain,Published,14-dec-1999,05-Jun-2000,usaeng
92000,Bond Updated,Problem,Text/plain,Published,04-dec-2003,14-dec-2003,usaeng
Any ideas where I can start, First of all whether it is doable using AWK ? Or maybe someone has already done something similar.
Any help appreaciated .
Thanks
I m relatively sure people have done this before but I couldnt find any pointers on Google. The issue is I have a xml data file with all kinds of tags, a sample is as below
<ROWSET>
<ROW>
<DOCID> 91000 </DOCID>
<SUBJECT> Bond Inserted</SUBJECT>
<TYPE> PROBLEM </TYPE>
<CONTENT_TYPE> TEXT/PLAIN </CONTENT_TYPE>
<STATUS> PUBLISHED </STATUS>
<CREATION_DATE> 14-DEC-1999 </CREATION_DATE>
<LAST_REVISION_DATE> 05-JUN-2000 </LAST_REVISION_DATE>
<LANGUAGE> USAENG </LANGUAGE>
</ROW>
<ROW>
<DOCID> 92000 </DOCID>
<SUBJECT> Bond Updated </SUBJECT>
<TYPE> PROBLEM </TYPE>
<CONTENT_TYPE> TEXT/PLAIN </CONTENT_TYPE>
<STATUS> PUBLISHED </STATUS>
<CREATION_DATE> 04-DEC-2003 </CREATION_DATE>
<LAST_REVISION_DATE> 14-DEC-2003 </LAST_REVISION_DATE>
<LANGUAGE> USAENG </LANGUAGE>
</ROW>
</ROWSET>
I need a script which can extract all the data in a comma seperated file so for the above two records I would have
91000,Bond Inserted,Problem,Text/plain,Published,14-dec-1999,05-Jun-2000,usaeng
92000,Bond Updated,Problem,Text/plain,Published,04-dec-2003,14-dec-2003,usaeng
Any ideas where I can start, First of all whether it is doable using AWK ? Or maybe someone has already done something similar.
Any help appreaciated .
Thanks