public final class XMLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static DocumentBuilder |
getSafeDocumentBuilder(boolean validating)
Provides a secure DocumentBuilder implementation, which is protected against
different types of entity expansion attacks and makes sure that only locally
available DTDs can be referenced within the XML document.
|
static SAXParser |
getSafeSAXParser(boolean validating)
Provides a secure SAXParser instance, which is protected against different
types of entity expension, DoS attacks and makes sure that only locally
available DTDs can be referenced within the XML document.
|
public static DocumentBuilder getSafeDocumentBuilder(boolean validating) throws ParserConfigurationException
validating
- Whether the returned DocumentBuilder should validate input.ParserConfigurationException
- In case xerces does not support one
of the required features.public static SAXParser getSafeSAXParser(boolean validating) throws ParserConfigurationException, SAXException
validating
- Whether the returned DocumentBuilder should validate input.ParserConfigurationException
- In case Xerces does not support one of
the required features.SAXException
- In case Xerces does not support one of the required
features.Copyright © 2010-2018, ForgeRock All Rights Reserved.