Well, I think Jan Wilson left this out, since it's unessential for his AOP introduction and because there are several ways to serialize/dump data, you may read about it here:
So you could simply use the following:
private static void DataContractSerialize(object argument, Type argumentType)
{
var settings = new XmlWriterSettings { Indent = true, ConformanceLevel = ConformanceLevel.Auto };
var serializer = new DataContractSerializer(argumentType);
using (XmlWriter xml = XmlWriter.Create(YOUR_PATH_TO_LOGFILE_CONST_STRING, settings))
{
xml.WriteStartDocument();
serializer.WriteObject(xml, argument);
}
}