static Parser makeParser(boolean validate) { SAXParserFactory factory = makeParserFactory(validate, false); try { return factory.newSAXParser().getParser(); } catch (ParserConfigurationException ex) { notifyNewSAXParserEx(ex); return null; } catch (SAXException ex) { notifyNewSAXParserEx(ex); return null; } }
/** Return XML reader or null if no provider exists. */ static XMLReader makeXMLReader(boolean validating, boolean namespaces) { SAXParserFactory factory = makeParserFactory(validating, namespaces); try { return factory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException ex) { notifyNewSAXParserEx(ex); return null; } catch (SAXException ex) { notifyNewSAXParserEx(ex); return null; } }