public void WriteElementFromConfig(String sElementName, NameValueCollection oConfig)
{
WriteStartElement(sElementName);
try {
_oXmlWriter.WriteAttributeString("id", oConfig.Get("id"));
// clear the id so it's not used in the loop
oConfig.Remove("id");
} catch (ArgumentOutOfRangeException) {
// skip it
}
foreach (String s in oConfig.AllKeys) {
_oXmlWriter.WriteElementString(s, oConfig[s]);
}
WriteEndElement();
}