File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML won't validate against XSD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML won Watch "XML won New topic
Author

XML won't validate against XSD

Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 497

Hi,

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


CUSTOMER.xml




CUSTOMER.xsd



Thanks

Are you better than me? Then please show me my mistakes..
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
What is the validation error(s)? How are you executing the validation?
N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55

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).


Thanks and Regards,
Nilesh Sahni | nsahni@infocepts.com | www.infocepts.com
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 462
    
    2
[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

Joined: Oct 07, 2010
Posts: 497

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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML won't validate against XSD
 
Similar Threads
XSD problem
Patterns in XML Schema - how to do it?
Exception while UNmarshalling
Problem with SOAP
Patterns in XML Schema - how to do it?