XSerializer
XSerializer copied to clipboard
Namespace from XmlRootAttribute is ignored
If a class is decorated with the XmlRootAttribute and specifies the Namespace property, the resulting xml does not add the namespace to the document's attributes.
[XmlRoot(Namespace = "http://example-namespace.com/")]
public class Foo
{
public string Bar { get; set; }
}