aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML Validation Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Validation Error" Watch "XML Validation Error" New topic
Author

XML Validation Error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9629
    
    2

I have the following XSD files:



The test.xsd that I'm importing is:



Now when I want to validate the following XML:



I get the following error:



Any ideas as to how I could resolve this error?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 547
    
    3
In test.xsd,

should be read
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9629
    
    2

That did not solve the problem either. I corrected it and still I face the same error! Do I have to pass both the XSD files in my validation routine?
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 547
    
    3
Your xml itself is incorrect:

should obviously read
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9629
    
    2

I modified my XML, but still face the same error!
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 547
    
    3
I have nothing to say on what I don't see. Goodbye.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9629
    
    2

The problem was with loading the Schema files and I do not see a reason as to why it should fail. I modified the bit where I load the XSD file to also load the imported XSD and then it seems to be fine!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Validation Error