I have a xsd and a MS-Excel spreadsheet. The excel sheet contains Xpath like representation of all the elements/fields of the xsd along with the corresponding data type as specified in the xsd.
For example if xsd contains a element as follows:
<xsd:complexType name="person">
<xsd:all>
<xsd:element name="name" type="xsd:string" minOccurs="0"/>
<xsd:element name="age" type="xsd:string" minOccurs="0"/>
</xsd:all>
</xsd:complexType>
The excel sheet content is as follows:
Column 2 (element/field name) Column 3 (data type)
person.name String
person.age String
I have a requirement to check if the content of the excel sheet is valid and complete. Thus I want to a generate xml file from a MS-Excel spreadsheet and validate it aganist an existing xsd.
The requirement details are as follows:
- Read the content of the second and third column of a MS-Excel spreadsheet.
- Ignore the rows whose content does not contain a dot separator
- generate xml
- validate it aganist the user specified xsd
How can this be done in a java program?