XmlSchemaClassGenerator icon indicating copy to clipboard operation
XmlSchemaClassGenerator copied to clipboard

is it possible to generate classess for custom types rather than a C# type approximation

Open Bednar87 opened this issue 7 months ago • 2 comments

I apologize if this is explained in the readme, but I have read through it and it's not clear to me .

The original XSD has the following:

<xs:complexType name="MyName1">
    <xs:sequence>
        <xs:element name="MyName" type="CustomTextType"/>
    </xs:sequence>
    
    

<xs:simpleType name="CustomTextType">
    <xs:restriction base="xs:string">
        <xs:minLength value="1"/>
        <xs:maxLength value="27"/>
    </xs:restriction>
</xs:simpleType>

The generated class is of type string and there is no custom class "CustomTextType" generated.

Is it possible to change that through command line options? My XSD has dozens of custom types like this and I would prefer to use them rather than the base classes.

Thank you

Bednar87 avatar May 19 '25 11:05 Bednar87

Currently, there is no support for this.

mganss avatar May 21 '25 09:05 mganss

thank you, understood.

Bednar87 avatar May 21 '25 10:05 Bednar87