private static L2ProductDefind CrateL2ProductDef(XElement element) { L2ProductDefind result = new L2ProductDefind(); result.Name = element.Attribute("name").Value; result.Desc = element.Attribute("desc").Value; result.Identify = element.Attribute("identify").Value; result.Product = element.Attribute("product").Value; XElement geoInfoElement = element.Element("GeoInfo"); if (geoInfoElement != null) { GeoInfos geoInfo = new GeoInfos(geoInfoElement.Attribute("poj4").Value); GetGeoAtrrs(geoInfo, geoInfoElement); GetGeoDef(geoInfo, geoInfoElement); result.GeoInfo = geoInfo; } XElement proInfoElement = element.Element("ProInfo"); if (proInfoElement != null) { ProInfos proInfo = new ProInfos(); GetProDataSets(proInfo, proInfoElement); result.ProInfo = proInfo; } return(result); }
private static void GetProDataSets(ProInfos proInfo, XElement proInfoElement) { XElement proDataSetElement = proInfoElement.Element("ProDataSets"); if (proDataSetElement != null) { proInfo.ProDatasets = proDataSetElement.Attribute("datasets").Value; } }