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 = “http://www.yourdomain.com/someData.xml”;
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: MyCreditTech.com