File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XMLSchemaValidation

 
jeya prabha
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using DocumentBuilderFactory for XMLSchemaValidation.
how to set jaxp.properties file?
I am using this link http://www.onjava.com/pub/a/onjava/2004/09/15/schema-validation.html
using jaxp parser for validation.
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/jaxp.properties if it does not exist already.
in the file add the following line...
javax.xml.parsers.DocumentBuilderFactory=fully.qualified.classname.of.the.thirdparty.DocumentBuilderFactoryClass

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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic