Need to create one generic stored procedure which will take table name as input parameter and create xml file with below format.
Xml file name should be table name.
<XML>
<TABLENAME></TABLENAME>
<RECORDS>
<RECORD>
<COLNAME>AAA</COLNAME>
<COLNAME>AAA</COLNAME>
<RECORD>
<RECORD>
<COLNAME>AAA</COLNAME>
<COLNAME>AAA</COLNAME>
<RECORD>
<RECORD>
<COLNAME>AAA</COLNAME>
<COLNAME>AAA</COLNAME>
<RECORD>
<RECORD>
<COLNAME>AAA</COLNAME>
<COLNAME>AAA</COLNAME>
<RECORD>
<RECORD>
<COLNAME>AAA</COLNAME>
<COLNAME>AAA</COLNAME>
<RECORD>
</RECORDS>
</XML>
<TABLENAME> = actual table name(case should be same as in database)
<COLNAME> = actual column names from table(case should be same as in database)
Keep other tags as it is. Repeat <RECORD> tag for each row retrieved.