• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validate XML against XSD using the Xerces DOM Parser

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I need to read XML with the Xerces DOM Parser and also validate it against prepared XSD. So far, I have this:





Now I tried to find how to do the validation, but without success. I believe it should be done by setting



but I don't now, what should be in the argument. Or am I wrong and there is different way? Thanks!
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, first of all, don't import that "com.sun" package. Use the standard XML parsers instead. And you should find your answer in this page from the Ranch's XML FAQ: HowToValidateXmlAgainstSchema
 
beda meda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Well, first of all, don't import that "com.sun" package. Use the standard XML parsers instead. And you should find your answer in this page from the Ranch's XML FAQ: HowToValidateXmlAgainstSchema


But if I remove 'com.sun' and leave only it says, there is no such class in package 'org.apache.xerces.parsers'.
 
reply
    Bookmark Topic Watch Topic
  • New Topic