質問

Here's a sample of the code I'm trying to generate:

<xs:simpleType name="IVL">
    <xs:restriction base="xs:duration"/>
</xs:simpleType>

<xs:complexType name="SF">
    <xs:attribute name="varde" type="xs:boolean"/>
</xs:complexType>  

The Complex type is generated but the simple types are left out.

Am I missing a setting or something or aren't WSCF.Blue able to handle simple types?

役に立ちましたか?

解決

I am not aware of any commonnly used XSD-to-code binding approach that on .NET would generate classes for simple types, except when XSD simpleTypes are restricted using enumeration facets.

This article pretty much stands for WSCF as well at least in the area of Type/primitive mapping.

Just for trivia, JAXB - a Java based approach for binding XML to Java classes - has this option built in (i.e. to generate classes even for simple types).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top