Windows Develop Bookmark and Share   
 index > Windows Forms General > DataSet and xml
 

DataSet and xml

i would like to add a data set to a xml file without over writeing the file. i want to appand to the file. How do i do this
cisco0407  Monday, July 03, 2006 7:34 PM
You would need to merge the 2.

Way #1 would involve:
Reading the xml file on disk into memory in an xml document.
Write the DataSet to an xmldocument.
Select the nodes from the dataset xml resultant and then merge them.
The ugly way to merge them (assuming there is no data overlapthat you have to keep track of) would be to simply get the resultant InnerXml and append that to your other xml document's root node. There may be other complexities involved but hopefully you get the idea.
MarcD  Monday, July 03, 2006 7:40 PM
You would need to merge the 2.

Way #1 would involve:
Reading the xml file on disk into memory in an xml document.
Write the DataSet to an xmldocument.
Select the nodes from the dataset xml resultant and then merge them.
The ugly way to merge them (assuming there is no data overlapthat you have to keep track of) would be to simply get the resultant InnerXml and append that to your other xml document's root node. There may be other complexities involved but hopefully you get the idea.
MarcD  Monday, July 03, 2006 7:40 PM

Hi,

Does the above solution solve your problem? If yes then could you please mark it as answered?

Thank you,
Bhanu.

Bhanu Prakash Nunna - MSFT  Wednesday, July 05, 2006 8:28 PM

You can use google to search for other answers

Custom Search

More Threads

• highlighting
• Configuration Files
• Forms compatibility between VC++ 2005 and VS 2005?
• Please Help me to Implement a key board Interface
• Doubt about Event and Delegate in multithread context
• How to print the contents of a DataGridView control?
• Disable Taskbar Icon
• General Feedback on .net 2.0 and VS 2005
• Adding/Removing parent's keypressed handler on MDI child VisibleChange method
• Replace Prompt