parser.setContentHandler(handler);
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://apache.org/xml/features/validation/schema", true);
parser.setErrorHandler(handler);
if (m_validateUsingLocalSchemas) {
parser.setEntityResolver(new SchemaResolver());
}
// Parse the XML
InputSource is = new InputSource(m_stream);
parser.parse(is);