my dog learned polymorphism
The moose likes XML and Related Technologies and the fly likes XMLSchemaValidation 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 "XMLSchemaValidation" Watch "XMLSchemaValidation" New topic


jeya prabha

Joined: Jun 03, 2008
Posts: 23
I am using DocumentBuilderFactory for XMLSchemaValidation.
how to set file?
I am using this link
using jaxp parser for validation.
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 378
If you are using a JDK that has a bundled JAXP implementation (i.e. parser in this case e.g. jdk 1.6, 1.5) you do not need to do anything.

However ff you want to use a different implementation than the bundled one then you have to choose one of the mechanisms set out in your link before the JVM falls back to the platform default, bundled implementation.

Have a look at this thread as well.

put the third party implementation in the class path.
create JAVA_HOME/jre/lib/ if it does not exist already.
in the file add the following line...

But usually if the implementation is distributed in a jar the service mechanism in the jar is already set up. If you extract the jar and check the file META-INF/services/javax.xml.parsers.DocumentBuilderFactory you can verify this. In which case you only have to add the jar to the classpath.
I agree. Here's the link:
subject: XMLSchemaValidation
jQuery in Action, 3rd edition