XSerializer icon indicating copy to clipboard operation
XSerializer copied to clipboard

Namespace from XmlRootAttribute is ignored

Open bfriesen opened this issue 10 years ago • 0 comments

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; }
}

bfriesen avatar Sep 23 '14 15:09 bfriesen