public virtual string ReadElementContentAsString(string localName, string namespaceURI) { CheckElement(localName, namespaceURI); return ReadElementContentAsString(); }
public ExamQuestion(XmlReader reader) : this() { QuestionIdentifier = reader.GetAttribute("identifier"); Question = reader.GetAttribute("question"); Image = reader.GetAttribute("image"); while (!reader.EOF) { switch (reader.NodeType) { case XmlNodeType.Element: if (reader.Name == "Answer") Answer = reader.ReadElementContentAsString(); else if (reader.Name == "Distractor") Distractors.Add(reader.ReadElementContentAsString()); else reader.Read(); break; case XmlNodeType.EndElement: return; default: reader.Read(); break; } } }