public static KeyStudent LoadFromXml(XElement Ques) { var res = new KeyStudent(); res.Id = (int)Ques.Element("id"); res.Answer = (string)Ques.Element("answer"); return(res); }
public static KeyBlank LoadFromXml(XElement Ques) { if (Ques != null) { var res = new KeyBlank(); foreach (var ques in Ques.Elements()) { foreach (var que in ques.Elements()) { res.Keys.Add(KeyStudent.LoadFromXml(que)); } } res.User = "******" + (string)Ques.Element("User").Attribute("f") + " " + (string)Ques.Element("User").Attribute("i") + " " + (string)Ques.Element("User").Attribute("o"); return(res); } return(null); }