PDA

View Full Version : Need to generate XML file



pplvinay
01-20-2009, 03:18 PM
Hi Everyone,

I need a help on creating XML file from database view.
View contains data in attached file.
Required XML file is in following format.

<DEPTINFO>
<DEPT>
<no>10</no>
<deptname>MFG</deptname>
<employees>
<employee>
<name>ABCD</name>
<no>1</no>
<sal>1234</sal>
</employee>
<employee>
<name>XYZ</name>
<no>2</no>
<sal>2345</sal>
</employee>
<employee>
<name>HYD</name>
<no>4</no>
<sal>2356</sal>
</employee>
</employees>
</DEPT>
<DEPT>
<no>11</no>
<deptname>ABC</deptname>
<employees>
<employee>
<name>JKL</name>
<no>3</no>
<sal>4567</sal>
</employee>
</employees>
</DEPT>
</DEPTINFO>

Sample XML file has been attached.Any help in this is appreciated.

Thanks in advance.

Thanks,
Vinay

4ndr34
01-21-2009, 04:32 AM
if i understood what u want, u should use kettle!