Esempio n. 1
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;
		}
Esempio n. 2
0
		private bool LoadSurvey(SurveyLoader surveyLoader)
		{
			const string nodeName = "Survey";
			if (!MatchingElementStart(nodeName))
				return false;

			// Process any attributes
			SurveyBase survey = new SurveyBase(m_xmlReader);
			surveyLoader.Survey = survey;

			// Process any children
			if (m_xmlReader.IsEmptyElement)
				return true;

			while (ReadNode())
			{
				if (MatchingElementEnd(nodeName))
					break;

				if (LoadGroup(survey))
					continue;
			}

			return true;
		}