Schema troubles.
-
I'm creating a typed DataSet for my XML file and I'm having trouble modifying the XSD file to conform to my data's format. Here's a sample of my data:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<dropdowns>
<Country lang="en">Albania</Country>
<Country lang="en">Algeria</Country>
...I need for my Country data table to have two columns: "lang" and "name". How do I set up the XSD to treat the contents of the Country element as my name column? I've tried this, but it's not working:
<xs:element name="Dropdowns" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Dropdowns" msprop:Generator_DataSetName="Dropdowns">
xs:complexType
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Country" form="unqualified" msprop:Generator_UserTableName="Country" msprop:Generator_RowDeletedName="CountryRowDeleted" msprop:Generator_RowChangedName="CountryRowChanged" msprop:Generator_RowClassName="CountryRow" msprop:Generator_RowChangingName="CountryRowChanging" msprop:Generator_RowEvArgName="CountryRowChangeEvent" msprop:Generator_RowEvHandlerName="CountryRowChangeEventHandler" msprop:Generator_TableClassName="CountryDataTable" msprop:Generator_TableVarName="tableCountry" msprop:Generator_RowDeletingName="CountryRowDeleting" msprop:Generator_TablePropName="Country">
<xs:complexType name="name" form="unqualified" msprop:Generator_UserColumnName="name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_ColumnVarNameInTable="columnname" type="xs:string" default="">
<xs:attribute name="lang" form="unqualified" msprop:Generator_UserColumnName="lang" msprop:nullValue="_throw" msprop:Generator_ColumnPropNameInRow="lang" msprop:Generator_ColumnPropNameInTable="langColumn" msprop:Generator_ColumnVarNameInTable="columnlang" type="xs:string" msdata:DefaultValue="en" use="required" />
</xs:complexType>
</xs:element>How do I fix the part in bold? Thanks! Alvaro
Eat right.
Exercise.
Die anyway.