I have to output data from a SQL Server database. I've been given an XSD.
using VB 2005.
Have not worked with supplied XSD before, so I'm a bit unsure about what to do next.
1) I've added the XSD to a VB project. The dataset seems to have several datatables, broken down like
Policy
____Premium
____Proposer
_________Name
_________Address
____RiskDetails
_________Business
_____________Trade
_____________Employees
_____________Wage Details
_________Clauses
So Business is a sub datatable of RiskDetails, and Trade is a sub of Business.
Going to the data sources window, I can see the breakdown as above. However, clicking the design box opens up some sort of schema design window. There are no options to add a table adapter.
What would be the best way to add the data?
2) Validation
The XSD also has extra information about the data, such as that below. Which I think means that the Category Code must be one of the values in the list. How should I use this information?
Is doesn't seem to come into the dataset.
Let says I add all my info to the dataset, and then output the XML. Is there a way to validate that the XML I've produced conforms to the XSD format I've been given?
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="3" />
<!-- Category code for Clerical Staff -->
<xsd:enumeration value="119" />
<!-- Category code for Manual Principals -->
<xsd:enumeration value="111" />
<!-- Category code for Manual Employees -->
<xsd:enumeration value="006" />
<!-- Category code for Machinists (woodworking cover) -->
<xsd:enumeration value="125" />
</xsd:restriction>
</xsd:simpleType>
Thanks
Simeon
using VB 2005.
Have not worked with supplied XSD before, so I'm a bit unsure about what to do next.
1) I've added the XSD to a VB project. The dataset seems to have several datatables, broken down like
Policy
____Premium
____Proposer
_________Name
_________Address
____RiskDetails
_________Business
_____________Trade
_____________Employees
_____________Wage Details
_________Clauses
So Business is a sub datatable of RiskDetails, and Trade is a sub of Business.
Going to the data sources window, I can see the breakdown as above. However, clicking the design box opens up some sort of schema design window. There are no options to add a table adapter.
What would be the best way to add the data?
2) Validation
The XSD also has extra information about the data, such as that below. Which I think means that the Category Code must be one of the values in the list. How should I use this information?
Is doesn't seem to come into the dataset.
Let says I add all my info to the dataset, and then output the XML. Is there a way to validate that the XML I've produced conforms to the XSD format I've been given?
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="3" />
<!-- Category code for Clerical Staff -->
<xsd:enumeration value="119" />
<!-- Category code for Manual Principals -->
<xsd:enumeration value="111" />
<!-- Category code for Manual Employees -->
<xsd:enumeration value="006" />
<!-- Category code for Machinists (woodworking cover) -->
<xsd:enumeration value="125" />
</xsd:restriction>
</xsd:simpleType>
Thanks
Simeon