This is in response to this article and is me giving dennis a hard time. =P
byte[] XmlToByte(XmlDocument d)
{
using (StringWriter sw = new StringWriter())
{
using (XmlTextWriter xw = new XmlTextWriter(sw))
{
d.WriteTo(xw);
ASCIIEncoding encoding = new ASCIIEncoding();
return encoding.GetBytes(sw.ToString());
}
}
}