using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Collections;
using System.Xml;
namespace MyConfigSectionHandler
{
public class MyHandler : IConfigurationSectionHandler
{
#region IConfigurationSectionHandler Members
public object Create(object parent, object configContext, System.Xml.XmlNode section)
{
ArrayList aList = new ArrayList();
string question = "";
XmlNode functionNode, functionChildNode;
for (int i = 0; i < section.ChildNodes.Count; i++)
{
functionNode = section.ChildNodes[i];
if (functionNode.NodeType != XmlNodeType.Comment)
{
for (int j = 0; j < functionNode.ChildNodes.Count; j++)
{
functionChildNode = functionNode.ChildNodes[j];
if (functionChildNode.NodeType != XmlNodeType.Comment)
{
if (functionChildNode.Name.ToLower() == "question")
{
question = functionChildNode.InnerText;
}
}
aList.Add(question);
}
}
}
return aList;
}
#endregion
}
}