public XElement SaveStudentToXml() { var xResU = new XElement("blank"); var XResQ = new XElement("questions"); for (int q = 0; q < Questions.Length; q++) { var XResQm = new XElement("question"); XResQm.Add(new XElement("id", Questions[q].Id)); XResQm.Add(new XElement("text", Questions[q].Text)); XResQm.Add(new XElement("option", Questions[q].AnswerOptions[GenAnswer[q][0]])); XResQm.Add(new XElement("option", Questions[q].AnswerOptions[GenAnswer[q][1]])); XResQm.Add(new XElement("option", Questions[q].AnswerOptions[GenAnswer[q][2]])); XResQ.Add(XResQm); } xResU.Add(XResQ); xResU.Add(ForUser.SaveToXml()); return(xResU); }
public XElement SavePrepottToXml() { var xResU = new XElement("blankForPrepot"); xResU.Add(); var XResQ = new XElement("questions"); for (int q = 0; q < Questions.Length; q++) { var XResQm = new XElement("question"); XResQm.Add(new XElement("id", Questions[q].Id)); XResQm.Add(new XElement("answer", GenAnswer[q][0])); XResQ.Add(XResQm); } xResU.Add(XResQ); xResU.Add(ForUser.SaveToXml()); return(xResU); }