Builder.FeedWriter.WriteElementFromConfig C# (CSharp) Method

WriteElementFromConfig() public method

public WriteElementFromConfig ( String sElementName, NameValueCollection oConfig ) : void
sElementName String
oConfig System.Collections.Specialized.NameValueCollection
return void
        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();
        }