Unfortunately no, since from my experience the SAXParser itself doesn't validate.You have to parse an XML document and add an Error Handler to discover whether the XML is valid or invalid.XML Schema (XSD) Validation using SAXParser This section describes a tutorial example on how to the Xerces2 SAXParser class to validate an XML document assigned with an XSD file.
Two things must be understood about the validating parser: method on white space that it knows to be irrelevant.
SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the Document Handler interface.
The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error.
The choice of validation method depends on the additional functionality required in the validation application.
SAXParser is recommended if SAX parsing event notification is required in addition to validation with a schema.