A
AmitSahoo
Guest
I have many XSD file with me. Its not possible to create form for each and every XSD. So how can I generate Windows Form at runtime using the XSD file and the type.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="XML Schema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="TestXSDDoc">
<xs:annotation>
<xs:documentation>Schema</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Col1" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Element1" minOccurs="1" maxOccurs="1">
<!-- -->
<xs:complexType>
<xs:sequence>
<xs:element name="DD" type="day_type" minOccurs="1" maxOccurs="1"/>
<xs:element name="MM" type="month_type" minOccurs="1" maxOccurs="1"/>
<xs:element name="YYYY" type="year_type" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="day_type">
<xs:restriction base="xs:string">
<xsattern value="[0-9]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="month_type">
<xs:restriction base="xs:string">
<xsattern value="[0-1][0-9]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="year_type">
<xs:restriction base="xs:string">
<xsattern value="[0-9]{4}"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Amit Sahoo
Continue reading...
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="XML Schema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="TestXSDDoc">
<xs:annotation>
<xs:documentation>Schema</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Col1" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Element1" minOccurs="1" maxOccurs="1">
<!-- -->
<xs:complexType>
<xs:sequence>
<xs:element name="DD" type="day_type" minOccurs="1" maxOccurs="1"/>
<xs:element name="MM" type="month_type" minOccurs="1" maxOccurs="1"/>
<xs:element name="YYYY" type="year_type" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="day_type">
<xs:restriction base="xs:string">
<xsattern value="[0-9]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="month_type">
<xs:restriction base="xs:string">
<xsattern value="[0-1][0-9]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="year_type">
<xs:restriction base="xs:string">
<xsattern value="[0-9]{4}"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Amit Sahoo
Continue reading...