private List<QuestionAnswer> buildQuestionAnswersList(XmlDocument x)
{
XmlNodeList qNodes = x.SelectNodes("/response/answer");
if (qNodes.Count > 0)
{
List<QuestionAnswer> qList = new List<QuestionAnswer>();
foreach (XmlNode qNode in qNodes)
{
QuestionAnswer answer = new QuestionAnswer();
XmlUtils.UseNode(qNode);
answer.Id = XmlUtils.Int("aid");
answer.QuestionId = XmlUtils.Int("qid");
answer.UserId = XmlUtils.Int("uid");
answer.Text = XmlUtils.String("text");
answer.Number = XmlUtils.Int("num");
answer.Date = XmlUtils.String("date");
answer.UserName = XmlUtils.String("name");
answer.UserPhoto = XmlUtils.String("photo");
answer.IsUserOnline = XmlUtils.Bool("online");
qList.Add(answer);
}
return qList;
}
return null;
}