This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XML validation issue in Xerces  RSS feed

nilesh shah
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using Xerces-2.8. I have a problem to load the schema file to validate the XML.

The validation worked when I was using an absolute path for the schema location. Is there any way I can use path relative to my context root in this example?

" C:\management.xsd");

But the same code has to be ported on Linux/Unix servers, I tried to give path relative to context root, and placed the xsd file under that path, but it doesn't seem to load the XSD file. For example I tried to put

management.xsd under WEB-INF/classes and tried

" /WEB-INF/classes/management.xsd");

I could use system property to set the path and track down my XSD file, but I wanted to know if there is a way without system property setting.
Any help will be appreciated. Thanks in advance,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!