Generate Xml from DataSet

monuindia2002

Member
Joined
Jan 26, 2006
Messages
8
Programming Experience
1-3
Hi,
I am populating a datagrid with a dataset, after making required changes user will press
Save button, which will save updated records in dataset.
after that i am generating an xml file from dataset like this
<NewDataSet>
<Person>
<PERSONFNAME>ABC</PERSONFNAME>
<PERSONLNAME>DEF</PERSONLNAME>
<ENTRYDATE>2006-01-12</ENTRYDATE>
<AGE>15</AGE>
</Person>
<Person>
<PERSONFNAME>Mahesh</PERSONFNAME>
<PERSONLNAME>Maheshwari</PERSONLNAME>
<ENTRYDATE>2006-01-12</ENTRYDATE>
<AGE>21</AGE>
</Person>
</NewDataSet>
i want to add an attribute to all element which are modified by user.
instead of this xml file i want to get an xml file like this
<NewDataSet>
<Person>
<PERSONFNAME originalValue="XYZ">ABC</PERSONFNAME> (Changed by user in DataGrid)
<PERSONLNAME originalValue="BBCA">DEF</PERSONLNAME> (Changed by user in DataGrid)
<ENTRYDATE>2006-01-12</ENTRYDATE>
<AGE originalValue="21">15</AGE> (Changed by user in DataGrid)
</Person>
<Person>
<PERSONFNAME>Mahesh</PERSONFNAME>
<PERSONLNAME>Maheshwari</PERSONLNAME>
<ENTRYDATE>2006-01-12</ENTRYDATE>
<AGE>21</AGE>
</Person>
</NewDataSet>
How can i do that, Please help me
Regards
Mahesh
 
Top Bottom