private bool LoadQuestion(GroupBase group) { const string nodeName = "Question"; if (!MatchingElementStart(nodeName)) return false; // Process any attributes QuestionBase question = new QuestionBase(m_xmlReader); group.QuestionList.Add(question); // Process any children if (m_xmlReader.IsEmptyElement) return true; while (ReadNode()) { if (MatchingElementEnd(nodeName)) break; if (LoadStatement(question)) continue; if (LoadResponses(question)) continue; } return true; }
private bool LoadGroup(SurveyBase survey) { const string nodeName = "Group"; if (!MatchingElementStart(nodeName)) return false; // Process any attributes GroupBase group = new GroupBase(m_xmlReader); survey.GroupList.Add(group); // Process any children if (m_xmlReader.IsEmptyElement) return true; while (ReadNode()) { if (MatchingElementEnd(nodeName)) break; if (LoadQuestion(group)) continue; } return true; }