Actually I transform an object to a XDocument with this function
public XDocument ToXDocument()
{
var xDocSerialized = new XDocument();
using (var writer = xDocSerialized.CreateWriter())
{
var serializer = new XmlSerializer(this.GetType(), new XmlRootAttribute("PrintRequest"));
serializer.Serialize(writer, this);
}
return xDocSerialized;
}
It is possible to add a xmlns in the process ?
I found this page, but it means cloning all XDocument again...