java.lang.Object
org.elasticsearch.core.XmlUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentBuildergetHardenedBuilder(String[] schemaFiles) Constructs a DocumentBuilder with all the necessary features for it to be securestatic DocumentBuilderFactoryReturns a DocumentBuilderFactory pre-configured to be securestatic SAXParserFactorystatic SchemaFactoryReturns a SchemaFactory configured to be securestatic ValidatorgetHardenedValidator(Schema schema) Constructs a Validator configured to be securestatic TransformerConstructs a Transformer configured to be securestatic XPathConstructs an XPath configured to be secure
-
Constructor Details
-
XmlUtils
public XmlUtils()
-
-
Method Details
-
getHardenedBuilder
public static DocumentBuilder getHardenedBuilder(String[] schemaFiles) throws ParserConfigurationException Constructs a DocumentBuilder with all the necessary features for it to be secure- Throws:
ParserConfigurationException- if one of the features can't be set on the DocumentBuilderFactory
-
getHardenedBuilderFactory
public static DocumentBuilderFactory getHardenedBuilderFactory() throws ParserConfigurationExceptionReturns a DocumentBuilderFactory pre-configured to be secure- Throws:
ParserConfigurationException
-
getHardenedXMLTransformer
Constructs a Transformer configured to be secure -
getHardenedSchemaFactory
public static SchemaFactory getHardenedSchemaFactory() throws SAXNotSupportedException, SAXNotRecognizedExceptionReturns a SchemaFactory configured to be secure -
getHardenedValidator
public static Validator getHardenedValidator(Schema schema) throws SAXNotSupportedException, SAXNotRecognizedException Constructs a Validator configured to be secure -
getHardenedSaxParserFactory
public static SAXParserFactory getHardenedSaxParserFactory() throws SAXNotSupportedException, SAXNotRecognizedException, ParserConfigurationException -
getHardenedXPath
Constructs an XPath configured to be secure
-