• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validing xml against Schemas using JDOM

 
Vicky Bajaj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic