src/main/java/de/alpharogroup/xsd/schema/ValidatorExtensions.java
public static Document parse(final File xml, final ErrorHandler errorHandler)
		throws SAXException, ParserConfigurationException, IOException
	{
		final DocumentBuilderFactory factory = getDocumentBuilderFactory(xml.getName());
		final DocumentBuilder builder = factory.newDocumentBuilder();
		builder.setErrorHandler(errorHandler);
		return builder.parse(xml);
	}
public static Document parse(final File xml, final ErrorHandler errorHandler)
		throws SAXException, ParserConfigurationException, IOException
	{
		final DocumentBuilderFactory factory = getDocumentBuilderFactory(xml.getName());
		final DocumentBuilder builder = factory.newDocumentBuilder();
		builder.setErrorHandler(errorHandler);
		return builder.parse(xml);
	}
Parses the.

@param xml
the xml
@param errorHandler
the error handler
@return the document
@throws SAXException
If a SAX error occurs during parsing.
@throws ParserConfigurationException
if a DocumentBuilder cannot be created which satisfies the configuration
requested.
@throws IOException
Signals that an I/O exception has occurred.