Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 01:06 AM
Authorized User
 
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to monuindia2002
Default Generate Xml from DataSet

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

Mahesh
__________________
Mahesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 - Generate a Single Dataset NJJim BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 July 16th, 2006 03:11 PM
generate xml from db in asp.net imjigu ASP.NET 1.0 and 1.1 Professional 1 July 4th, 2006 12:27 AM
generate xml from db in asp.net imjigu ASP.NET 1.0 and 1.1 Basics 0 June 30th, 2006 02:04 AM
Generate a summary from an XML file. Missing_Piece XSLT 1 May 2nd, 2006 04:58 AM
How to generate WORD doc. from XML files??? iapraiz XML 1 March 11th, 2004 05:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.