Steps for Consuming XML data in .Net
Introduction While consuming third-party RSS feeds, I found I had to relearn how to deal with XML data. This post is meant to prepare any developer who needs to consume XML which they do not control. While I used RSS feeds, any XML will apply. I wanted to change the meta data and data of the XML file into a model of data that I could control with .Net classes and conventional data storage. This post is organized to take you from an xml file to .Net classes able to consume, serialize, and test the xml. Generating an XSD file from an XML file using Xsd.exe The first step is to make sure you have the XML Schema Definition tool, xsd.exe , installed. It is part of the .Net Framework tools . Make sure the executable location is part of the system path , user path, or command prompt path. On my computer the path is “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin” and I added it to the system path so it is available at any command prompt, regardless of the user. Se...