• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Validing xml against Schemas using JDOM

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic