This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Validing xml against Schemas using JDOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Validing xml against Schemas using JDOM" Watch "Validing xml against Schemas using JDOM" New topic
Author

Validing xml against Schemas using JDOM

Vicky Bajaj
Greenhorn

Joined: Jun 30, 2003
Posts: 11
Hi,
I have to validate a XML document against Schema using JDOM API. Can anyone tell me or send me the example code for this. I have got some code from www.jdom.org but when I follow the same thing in my code it says
"org.jdom.JDOMException: Error on line 2 of document file:///D:/Demo.xml: cvc-elt
.1: Cannot find the declaration of element 'Demo'."
my XML file name is Demo.xml
and Schema name is Demo.xsd
If anyone can help.
Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validing xml against Schemas using JDOM
 
It's not a secret anymore!