Things on DotNet, programming, and other useless stuff

DataSets and XML - The Simplistic Approach

One of the first ways I learned how to read xml data from external data sources was by using a DataSet’s ReadXML function. This function takes file path for an XML document and then converts it to a Dataset. This functionality is great when you need a simple way to process an XML document.  In addition the DataSet object also offers a simple way to save data in an xml format by using the WriteXML function. This function saves the current data in the DataSet to an XML file to be used later.

DataSet ds  = New DataSet();
String filePath = “”;
String fileSavePath = “C:\Temp\Test.xml”
//Read file for this location
//Save file to this location

I have used the ReadXML function before when consuming data from external Rss feeds to display on one of my sites.  It allows me to quickly pull in data from external sites with little to no processing.

Example site:

Comments (2) -

  • compare web hosting

    12/18/2010 1:23:32 PM |

    I am impressed, I must say. Really seldom do I come across a blog that’s both educational and entertaining, and let me tell you, you have hit the nail on the head. Your article is outstanding; the issue is something that not many people are talking intelligently about. I am really happy that I stumbled across this in my search for something relating to this.

  • License Plate Holders

    12/18/2010 4:20:40 PM |

    Thank you so much for blogging about this. You have no idea how much energy you have saved me. Keep on writing and I'll keep checking back!

  • crypter

    12/24/2010 7:35:10 PM |

    Stored for later use. Helped me alot, appreciate the time you guys put it in.

  • Lashaun Rossel

    12/25/2010 11:06:31 AM |

    I totally read your distribute and which sort I can certainly say is that it is been a long time since I discovered an article that i completely read with out being bored to death, keep them coming.

Comments are closed