private XmlWriter CreateXmlWriter(NameValueCollection oXmlConfig, String sOutputFile)
{
XmlWriterSettings xmlSettings = new XmlWriterSettings();
xmlSettings.Indent = Boolean.Parse(oXmlConfig.Get("Indent"));
xmlSettings.IndentChars = oXmlConfig.Get("IndentChars");
xmlSettings.ConformanceLevel = oXmlConfig.Get("ConformanceLevel") == "Fragment" ? ConformanceLevel.Fragment : ConformanceLevel.Document;
return XmlWriter.Create(sOutputFile, xmlSettings);
}