Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem related to XML validation using XSD

 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan ,

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

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


Good day...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic