public virtual XmlElement AppendToNode(XmlElement elm)
{
foreach (System.Reflection.FieldInfo info in this.GetType().GetFields())
{
// System.Diagnostics.Debug.WriteLine("ToXml:: " +
// info.FieldType.Name + ": " + info.Name + " = " + info.GetValue(this).ToString() , "TRACE");
if (info.FieldType.IsArray)
{
elm.SetAttribute(info.Name, BitConverter.ToString((byte[])info.GetValue(this), 0));
}
else
{
elm.SetAttribute(info.Name, info.GetValue(this).ToString());
}
}
return elm;
}