Пример #1
0
		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;
		}
Пример #2
0
		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;
		}