| Author |
Validate XML against XSD using the Xerces DOM Parser
|
beda meda
Greenhorn
Joined: Jul 15, 2010
Posts: 6
|
|
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!
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
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
Joined: Jul 15, 2010
Posts: 6
|
|
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'.
|
 |
 |
|
|
subject: Validate XML against XSD using the Xerces DOM Parser
|
|
|