Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven


Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using DocumentBuilderFactory for XMLSchemaValidation.
how to set file?
I am using this link
using jaxp parser for validation.
Ranch Hand
Posts: 378
  • 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/ 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.
Why fit in when you were born to stand out? - Seuss. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!