This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML/ DOM validation against Xml Schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML/ DOM validation against Xml Schema" Watch "XML/ DOM validation against Xml Schema" New topic

XML/ DOM validation against Xml Schema

Christophe Grosjean
Ranch Hand

Joined: Jan 22, 2002
Posts: 51
Hi everyone,
I need to validate a built DOM against a XML Schema. Is there a way to perform that ?
If not, how can I validate an XML file ?
Later, I must transform my DOM object into XML to store it into a database. If there is a reference to my XSD file, will the transformer perform the validation (or does it only check well-formedness?) ?
Can anyone help ?
timothy zimmerman
Ranch Hand

Joined: Jun 26, 2001
Posts: 149
I have not used it for this myself but I believe Xerces-J supports XSchema. You can check it out at
Also there is a page with a list of tools and links
Christophe Grosjean
Ranch Hand

Joined: Jan 22, 2002
Posts: 51
Well validation with Xerces works well with DTD but seems not working with XML Schema ?
Is there something particular to do while validating with XML Schema ?
Thanks if someone could tell me!!
Badal Kotecha
Ranch Hand

Joined: Sep 06, 2000
Posts: 42
I got the same problem...
when i m using xalan-j 2.2 xpath queries on xml document which is refering some xml schema is not working..
has anyone used ApplyXPath application provided with xalanj-2 2.2 .. its not working with schema... ?
Its working fine with DTD...

y is that so.... ?
ur help is highly appreciated....
thanks in adv.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: XML/ DOM validation against Xml Schema
jQuery in Action, 3rd edition