Anyone have a basic example of writing XML data from a string within a class out to SQL database table? This snippet would be much appeciated. <BR><BR><BR>Here is my code:<BR><BR>public class MailCustomPublisher : IPublishException<BR> {<BR> private string m_LogName = @"C:ErrorLog.txt";<BR> private string m_OpMail = "";<BR><BR> public MailCustomPublisher()<BR> {<BR> }<BR> // Provide implementation of the IPublishException interface<BR> // This contains the single Publish method.<BR> void IPublishException.Publish(Exception exception, <BR> NameValueCollection AdditionalInfo, <BR> NameValueCollection ConfigSettings)<BR> {<BR> // Load Config values if they are provided.<BR> if (ConfigSettings != null)<BR> {<BR> if (ConfigSettings["fileName"] != null && <BR> ConfigSettings["fileName"].Length &#062; 0)<BR> { <BR> m_LogName = ConfigSettings["fileName"];<BR> }<BR> if (ConfigSettings["operatorMail"] !=null && <BR> ConfigSettings["operatorMail"].Length &#062; 0)<BR> {<BR> m_OpMail = ConfigSettings["operatorMail"];<BR> }<BR> }<BR> // Create StringBuilder to maintain publishing information.<BR> StringBuilder strInfo = new StringBuilder();<BR><BR> // Record the contents of the AdditionalInfo collection.<BR> if (AdditionalInfo != null)<BR> {<BR> // Record General information.<BR> strInfo.Append("
General Information
");<BR> strInfo.Append("
Additonal Info:");<BR> foreach (string i in AdditionalInfo)<BR> {<BR> strInfo.Append("
" + i + ": " + AdditionalInfo.Get(i));<BR> }<BR> }<BR> // Append the exception text<BR> strInfo.Append ("

Exception Information
" + exception.ToString());<BR><BR> // Write the entry to the log file. <BR> using ( FileStream fs = File.Open(m_LogName,<BR> FileMode.Create,FileAccess.ReadWrite))<BR> {<BR> using (StreamWriter sw = new StreamWriter(fs))<BR> {<BR> sw.Write(strInfo.ToString());<BR> }<BR> }<BR> // send notification email if operatorMail attribute was provided<BR> if (m_OpMail.Length &#062; 0)<BR> {<BR> string subject = "Exception Notification";<BR> string body = strInfo.ToString();<BR> SmtpMail.Send("", m_OpMail, subject, body);<BR> }<BR> }<BR> }<BR>}<BR>