I've been looking for an example on how to validate an XML file against an XSD schema using JDOM 2.0 before parsing it.
I've been searching for about an hour but wasn't able to find a solution which would work and allow me to provide the path to the XSD file (located on the local file-system) from inside the application code, rather than as an attribute in the XML file.
I am surprised that there is not an easily reachable sample snippet on the Internet already. I would be grateful if you could provide one here.