Package org.pentaho.di.core.xml
Class XMLParserFactoryProducer
- java.lang.Object
-
- org.pentaho.di.core.xml.XMLParserFactoryProducer
-
public class XMLParserFactoryProducer extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocumentBuilderFactory
createSecureDocBuilderFactory()
Creates an instance ofDocumentBuilderFactory
class with enabledXMLConstants.FEATURE_SECURE_PROCESSING
property.static SAXParserFactory
createSecureSAXParserFactory()
Creates an instance ofSAXParserFactory
class with enabledXMLConstants.FEATURE_SECURE_PROCESSING
property.static TransformerFactory
createSecureTransformerFactory()
static XMLInputFactory
createSecureXMLInputFactory()
static org.dom4j.io.SAXReader
getSAXReader(EntityResolver resolver)
-
-
-
Method Detail
-
createSecureDocBuilderFactory
public static DocumentBuilderFactory createSecureDocBuilderFactory() throws ParserConfigurationException
Creates an instance ofDocumentBuilderFactory
class with enabledXMLConstants.FEATURE_SECURE_PROCESSING
property. 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, ParserConfigurationException
Creates an instance ofSAXParserFactory
class with enabledXMLConstants.FEATURE_SECURE_PROCESSING
property. 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
public static org.dom4j.io.SAXReader getSAXReader(EntityResolver resolver)
-
createSecureXMLInputFactory
public static XMLInputFactory createSecureXMLInputFactory()
-
createSecureTransformerFactory
public static TransformerFactory createSecureTransformerFactory() throws TransformerConfigurationException
-
-