The flexibility of XML serialization comes from attributes and IXmlSerializable. XmlRoot, XmlElement, XmlAttribute are a few that make it very easy to point the serializer in some common but useful directions. Without more information, it might look something like this:
[XmlRoot("cars")]
public class Cars
{
[XmlAttribute("year")]
public int Year {get;set;}
[XmlElement("engineType")]
public EngineType EngineType {get;set;}
[XmlElement("makes")]
public List<Make> Makes {get;set;}
}
public class EngineType
{
[XmlAttribute("name")]
public string Name {get;set;}
[XmlElement("part")]
public Part Part {get;set;}
}
public class Make
{
[XmlAttribute("name")]
public string Name {get;set;}
[XmlAttribute("id")]
public int ID {get;set;}
[XmlElement("models")]
public List<Model> Models {get;set;}
}
public class Model
{
[XmlAttribute("name")]
public string Name {get;set;}
[XmlAttribute("id")]
public int ID {get;set;}
}