aspose file tools*
The moose likes Web Services and the fly likes Problem related to XML validation using XSD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem related to XML validation using XSD" Watch "Problem related to XML validation using XSD" New topic
Author

Problem related to XML validation using XSD

Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 146

Hi All ,


Can anyone suggest why i m getting the following error

cvc-complex-type.2.4.d: Invalid content was found starting with element 'ROEInfo'. No child element is expected at this point.



Here are my xml :--


Here is my XSD :--






Thanks ,

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Your schema says that the <ROEList> element may contain exactly one <ROEInfo> child element.
This happens because the default value of maxOccurs is one and you have only specified minOccurs=1 here:

Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 146

Thanks Ivan ,

I got the solution ...you are correct..

I have set the maxOccurance="unbounded" and it works perfectly.


Good day...
 
jQuery in Action, 2nd edition
 
subject: Problem related to XML validation using XSD