/** * Obtains a configured XMLReader. * * This method is used when the client-specified * {@link SAXSource} object doesn't have XMLReader. * * {@link Unmarshaller} is not re-entrant, so we will * only use one instance of XMLReader. * * Overriden in order to fix potential security issue. */ @Override protected XMLReader getXMLReader() throws JAXBException { if (reader == null) { try { SAXParserFactory parserFactory = XmlFactory.createParserFactory(context.disableSecurityProcessing); // there is no point in asking a validation because // there is no guarantee that the document will come with // a proper schemaLocation. parserFactory.setValidating(false); reader = parserFactory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) { throw new JAXBException(e); } catch (SAXException e) { throw new JAXBException(e); } } return reader; }
/** * Obtains a configured XMLReader. * * This method is used when the client-specified * {@link SAXSource} object doesn't have XMLReader. * * {@link Unmarshaller} is not re-entrant, so we will * only use one instance of XMLReader. * * Overriden in order to fix potential security issue. */ @Override protected XMLReader getXMLReader() throws JAXBException { if (reader == null) { try { SAXParserFactory parserFactory = XmlFactory.createParserFactory(context.disableSecurityProcessing); // there is no point in asking a validation because // there is no guarantee that the document will come with // a proper schemaLocation. parserFactory.setValidating(false); reader = parserFactory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) { throw new JAXBException(e); } catch (SAXException e) { throw new JAXBException(e); } } return reader; }
public DOMForest( InternalizationLogic logic, Options opt ) { if (opt == null) throw new AssertionError("Options object null"); this.options = opt; try { DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(opt.disableXmlSecurity); this.documentBuilder = dbf.newDocumentBuilder(); this.parserFactory = XmlFactory.createParserFactory(opt.disableXmlSecurity); } catch( ParserConfigurationException e ) { throw new AssertionError(e); } this.logic = logic; }
public DOMForest( InternalizationLogic logic, Options opt ) { if (opt == null) throw new AssertionError("Options object null"); this.options = opt; try { DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(opt.disableXmlSecurity); this.documentBuilder = dbf.newDocumentBuilder(); this.parserFactory = XmlFactory.createParserFactory(opt.disableXmlSecurity); } catch( ParserConfigurationException e ) { throw new AssertionError(e); } this.logic = logic; }
public DOMForest( InternalizationLogic logic, Options opt ) { if (opt == null) throw new AssertionError("Options object null"); this.options = opt; try { DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(opt.disableXmlSecurity); this.documentBuilder = dbf.newDocumentBuilder(); this.parserFactory = XmlFactory.createParserFactory(opt.disableXmlSecurity); } catch( ParserConfigurationException e ) { throw new AssertionError(e); } this.logic = logic; }
/** * Obtains a configured XMLReader. * * This method is used when the client-specified * {@link SAXSource} object doesn't have XMLReader. * * {@link Unmarshaller} is not re-entrant, so we will * only use one instance of XMLReader. * * Overriden in order to fix potential security issue. */ @Override protected XMLReader getXMLReader() throws JAXBException { if (reader == null) { try { SAXParserFactory parserFactory = XmlFactory.createParserFactory(context.disableSecurityProcessing); // there is no point in asking a validation because // there is no guarantee that the document will come with // a proper schemaLocation. parserFactory.setValidating(false); reader = parserFactory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) { throw new JAXBException(e); } catch (SAXException e) { throw new JAXBException(e); } } return reader; }
/** * Obtains a configured XMLReader. * * This method is used when the client-specified * {@link SAXSource} object doesn't have XMLReader. * * {@link Unmarshaller} is not re-entrant, so we will * only use one instance of XMLReader. * * Overriden in order to fix potential security issue. */ @Override protected XMLReader getXMLReader() throws JAXBException { if (reader == null) { try { SAXParserFactory parserFactory = XmlFactory.createParserFactory(context.disableSecurityProcessing); // there is no point in asking a validation because // there is no guarantee that the document will come with // a proper schemaLocation. parserFactory.setValidating(false); reader = parserFactory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) { throw new JAXBException(e); } catch (SAXException e) { throw new JAXBException(e); } } return reader; }
/** * Creates {@link XMLParser} for XSOM which reads documents from * this DOMForest rather than doing a fresh parse. * * The net effect is that XSOM will read transformed XML Schemas * instead of the original documents. */ public XMLParser createParser() { return new DOMForestParser(this, new JAXPParser(XmlFactory.createParserFactory(options.disableXmlSecurity))); }
/** * Creates {@link XMLParser} for XSOM which reads documents from * this DOMForest rather than doing a fresh parse. * * The net effect is that XSOM will read transformed XML Schemas * instead of the original documents. */ public XMLParser createParser() { return new DOMForestParser(this, new JAXPParser(XmlFactory.createParserFactory(options.disableXmlSecurity))); }
/** * Creates {@link XMLParser} for XSOM which reads documents from * this DOMForest rather than doing a fresh parse. * * The net effect is that XSOM will read transformed XML Schemas * instead of the original documents. */ public XMLParser createParser() { return new DOMForestParser(this, new JAXPParser(XmlFactory.createParserFactory(options.disableXmlSecurity))); }
XMLReader reader; try { SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing); reader = factory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) {
XMLReader reader; try { SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing); reader = factory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) {
SAXParserFactory pf = XmlFactory.createParserFactory(model.options.disableXmlSecurity); DocumentBuilderFactory domFactory = XmlFactory.createDocumentBuilderFactory(model.options.disableXmlSecurity); DOMBuilder builder = new DOMBuilder(domFactory);
SAXParserFactory pf = XmlFactory.createParserFactory(model.options.disableXmlSecurity); DocumentBuilderFactory domFactory = XmlFactory.createDocumentBuilderFactory(model.options.disableXmlSecurity); DOMBuilder builder = new DOMBuilder(domFactory);
SAXParserFactory pf = XmlFactory.createParserFactory(model.options.disableXmlSecurity); DocumentBuilderFactory domFactory = XmlFactory.createDocumentBuilderFactory(model.options.disableXmlSecurity); DOMBuilder builder = new DOMBuilder(domFactory);
private final JAXPParser base = new JAXPParser(XmlFactory.createParserFactory(opt.disableXmlSecurity));
private final JAXPParser base = new JAXPParser(XmlFactory.createParserFactory(opt.disableXmlSecurity));
private final JAXPParser base = new JAXPParser(XmlFactory.createParserFactory(opt.disableXmlSecurity));