.

creating CS classes from XML or XSD

Open the Visual Studio Command Prompt (Start -> Visual Studio -> Visual Studio Tools -> Visual Studio Command Prompt).

Navigate to your folder containing the XML/XSD file, e.g.:
cd “c:\temp”

Type:
xsd xmlFileToConvert.xml

this will creat a .xsd file in the same folder

Type:
xsd xmlFileToConvert.xsd /classes

this will creat a .cs file in the same folder

To Deserialize this file:

public void decode(string input)
{
    var ContentFromXmlFile = XmlDeserialize<OuterClassName>(input);
}

public T XmlDeserialize<T>(string xml)
{
    var textReader = new XmlTextReader(new StringReader(xml));
    var xmlSerializer = new XmlSerializer(typeof (T)); 
    var result = xmlSerializer.Deserialize(textReader);
    return (T) result;
}