Вы можете использовать System.Runtime.Serialization.DataContractSerializer для генерации класса.
TheClass result = null;
DataContractSerializer dcs = new DataContractSerializer(typeof(TheClass));
using(StringReader reader = new StringReader(xml))
{
using(XmlReader XmlReader = new XmlReader(reader))
{
result = dcs.ReadObject() as TheClass;
}
}