satya repaka

satya repaka

  • NA
  • 47
  • 12.8k

Converting the datatable values to xml format

Oct 30 2015 3:29 AM
Hi,
 
I am getting the data in dataset i.e only one record but that one record should display in below format. I want the dataset data in below format. Kindly help me as early as possible.
 
Here remunerationData, wageData, wageTypeData noOfRecords="15", wageType number="1" ..........wageType number="15"          are the custom tags.
 Other tags came from column names of the table. 
 
 
<remunerationData>
<Reason>01</Reason>
<wageData>
<PayScaleType>02</PayScaleType>
<PayScaleArea>08</PayScaleArea>
<Band>7</Band>
<Cluster>01</Cluster>
<wageTypeData noOfRecords="15">
<wageType number="1">
<type>9120</type>
<amount>102881</amount>
</wageType>
<wageType number="2">
<type>1100</type>
<amount>36008</amount>
</wageType>
<wageType number="3">
<type>1110</type>
<amount>18004</amount>
</wageType>
<wageType number="4">
<type>1130</type>
<amount>1250</amount>
</wageType>
<wageType number="5">
<type>1120</type>
<amount>800</amount>
</wageType>
<wageType number="6">
<type>1170</type>
<amount>0</amount>
</wageType>
<wageType number="7">
<type>1190</type>
<amount>0</amount>
</wageType>
<wageType number="8">
<type>1195</type>
<amount>0</amount>
</wageType>
<wageType number="9">
<type>1140</type>
<amount>42497</amount>
</wageType>
<wageType number="10">
<type>9130</type>
<amount>98560</amount>
</wageType>
<wageType number="11">
<type>9110</type>
<amount>4321</amount>
</wageType>
<wageType number="12">
<type>9001</type>
<amount>0</amount>
</wageType>
<wageType number="13">
<type>9150</type>
<amount>3000</amount>
</wageType>
<wageType number="14">
<type>9140</type>
<amount>105881</amount>
</wageType>
<wageType number="15">
<type>9160</type>
<amount>123456</amount>
</wageType>
</wageTypeData>
</wageData>
</remunerationData>
 

Answers (3)