This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Along this, the following code and a simple data sample deliver an error however.
Troubleshooting: - XML+XSD checked online here, they seem to be okay then http://www.freeformatter.com/xml-validator-xsd.html - Local web server is working; if XSD url is changed, program reports connection error
- Local XML file is also there, changing its name causes a file not found error
Questions/Discussion: - Q1 How to validate against schema, defining its location via code e.g. externally to the XML, so without changing the XML data (e.g. online tool might not load test.xsd locally to do the check)?
- Q2 How to validate passing schema as an xml schema string?
- Q3 Is it possible to validate an XML string without reading from disk?
Relevant error output (omitting warning about required custom error handler):