I was using JAXB for reading one configuration file and before unmarshall, I want to validate the document. To do this we need to know two things:
- How to link xml document with schema
- How to configure SAX/DOM parser to use the schema and validate
Below are the excellent resources I found explaining above steps:
- Link schema with xml
- Configure parser to use schema for validation