2
Vote

Optionally exclude Namespace parameter in XmlType and XmlRoot attributes

description

I'd like to request the ability to optionally exclude the Namespace parameter in XmlRoot attributes.

For example, "xsd2code.exe test.xsd test test.cs /xa+" would generate:
namespace test {
    ...    

    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.test.com/1.0/test.xsd")]
    [System.Xml.Serialization.XmlRootAttribute("RequestA", Namespace="http://www.test.com/1.0/test.xsd", IsNullable=false)]
    public partial class RequestA { ... }

}
However, I would like to be able to generate code as follows:
namespace test {
    ...    

    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("RequestA", IsNullable=false)]
    public partial class RequestA { ... }

}
Thank you.

comments