سؤال

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