public AdsXmlFormat GetXmlFormat(string xmlPath)
{
XmlSerializer serializer = new XmlSerializer(typeof(List<AdsXmlFormat>));
FileStream outstream = new System.IO.FileStream(xmlPath, System.IO.FileMode.Open);
var adsXmlCollection = (List<AdsXmlFormat>)serializer.Deserialize(outstream);
outstream.Close();
AdsXmlFormat def = null;
foreach (var ads in adsXmlCollection)
{
if (ads.Version == _version)
{
return ads;
}
if (ads.Version == "Default")
{
def = ads;
}
}
return def;
}