To add a namespace to your xml output simply decorate the top level class in your object graph with an XmlRoot attribute.
[XmlRoot("doc", "http://mynamspace.com")]
class Document
{
   ...
}