XML schemas are powerful but also rather complicated to use within Java.
Within my PhD Thesis, I used them a lot. One problem that can arise is that validating an XML document with a schema normally needs network access, as the schema locations are typically specified with URLs. I will show you here how to configure the SAX parser to use schemas stored in the jar instead.