Package org.pentaho.di.core.xml
Class XMLParserFactoryProducer
java.lang.Object
org.pentaho.di.core.xml.XMLParserFactoryProducer
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentBuilderFactoryCreates an instance ofDocumentBuilderFactoryclass with enabledXMLConstants.FEATURE_SECURE_PROCESSINGproperty.static SAXParserFactoryCreates an instance ofSAXParserFactoryclass with enabledXMLConstants.FEATURE_SECURE_PROCESSINGproperty.static TransformerFactorystatic XMLInputFactorystatic org.dom4j.io.SAXReadergetSAXReader(EntityResolver resolver)
-
Method Details
-
createSecureDocBuilderFactory
public static DocumentBuilderFactory createSecureDocBuilderFactory() throws ParserConfigurationExceptionCreates an instance ofDocumentBuilderFactoryclass with enabledXMLConstants.FEATURE_SECURE_PROCESSINGproperty. Enabling this feature prevents from some XXE attacks (e.g. XML bomb) See PPP-3506 for more details.- Throws:
ParserConfigurationException- if feature can't be enabled
-
createSecureSAXParserFactory
public static SAXParserFactory createSecureSAXParserFactory() throws SAXNotSupportedException, SAXNotRecognizedException, ParserConfigurationExceptionCreates an instance ofSAXParserFactoryclass with enabledXMLConstants.FEATURE_SECURE_PROCESSINGproperty. Enabling this feature prevents from some XXE attacks (e.g. XML bomb)- Throws:
ParserConfigurationException- if a parser cannot be created which satisfies the requested configuration.SAXNotRecognizedException- When the underlying XMLReader does not recognize the property name.SAXNotSupportedException- When the underlying XMLReader recognizes the property name but doesn't support the property.
-
getSAXReader
-
createSecureXMLInputFactory
-
createSecureTransformerFactory
public static TransformerFactory createSecureTransformerFactory() throws TransformerConfigurationException
-