G
Guest
Hi, I'm trying to use a typed DataSet based on an XML schema file. Here is a
sample XML schema file for a "Location" with four typed-defined elements:
<xs:element name="Document1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Location">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0" />
<xs:element name="Address" type="xs:string" minOccurs="0" />
<xs:element name="Phone" type="xs:string" minOccurs="0" />
<xs:element name="Active" type="xs:boolean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
Now, I'd like to create a DataSet based on this file. In the Dataset
Designer, I would like to see a DataTable called "Location" with the four
specified DataColumns.
I know I can do this at run-time by calling XML methods of the DataSet but
how can I define the schema at design time?
Any thoughts are appreciated!
sample XML schema file for a "Location" with four typed-defined elements:
<xs:element name="Document1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Location">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0" />
<xs:element name="Address" type="xs:string" minOccurs="0" />
<xs:element name="Phone" type="xs:string" minOccurs="0" />
<xs:element name="Active" type="xs:boolean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
Now, I'd like to create a DataSet based on this file. In the Dataset
Designer, I would like to see a DataTable called "Location" with the four
specified DataColumns.
I know I can do this at run-time by calling XML methods of the DataSet but
how can I define the schema at design time?
Any thoughts are appreciated!