Thursday, 26 February 2015

XSD SubElement Validations



This is my xsd file:



<xs:schema/>
<xs:element name="MainEvent">
<xs:complexType>
<xs:sequence>
<xs:element ref="requestID"/>
<xs:element name="subEvent" minOccurs="100" maxOccurs="1000">

</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>


So I want to apply validations using this XSD on my incoming XML file during UN-marshaling . If I convert this XML into MainEvent bean, I am able to apply validations, but there are multiple subEvent.


I want to apply XSD validations on subEvent. How can I do that. Please help me and thanks in advance. I also asked following question related to this but didn't found solution: XSD Validation Using Schema Issue


No comments:

Post a Comment