Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML won't validate against XSD

 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My XML document won't validate against the schema.. Please let me know what I am doing wrong...


CUSTOMER.xml




CUSTOMER.xsd



Thanks
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the validation error(s)? How are you executing the validation?
 
N Sahni
Ranch Hand
Posts: 55
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I applied validation on below xml and xsd I got following exception:

In XSD at line 5 you have declared CUSTOMER element as simple type (String) and at line 9 you declared CUSTOMER element as complex type (CUST).
 
g tsuji
Ranch Hand
Posts: 669
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[1]
[1.1]

[1.2]

[1.3]

[1.4]

[2]
>Are you better than me? Then please show me my mistakes..
I can't show you the mistakes of that statement, maybe somebody can.
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, pardon me for the late reply..

Thanks all of you for helping me to solve this out.. After collecting the details all of you gave and after having look at the correction you mentioned, I managed to work that fine.. Thanks a lot...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic