public final class SafeXMLParsing extends Object
ResourceLoader
. In this case it allows external entities and xincludes, but only
referring to files reachable by the loader.Modifier and Type | Field and Description |
---|---|
static String |
SYSTEMID_UNTRUSTED |
Modifier and Type | Method and Description |
---|---|
static Document |
parseConfigXML(org.slf4j.Logger log,
ResourceLoader loader,
String file)
Parses a config file from ResourceLoader.
|
static Document |
parseUntrustedXML(org.slf4j.Logger log,
InputStream in)
Parses the given InputStream as XML, disabling any external entities with secure processing enabled.
|
static Document |
parseUntrustedXML(org.slf4j.Logger log,
Reader reader)
Parses the given InputStream as XML, disabling any external entities with secure processing enabled.
|
static Document |
parseUntrustedXML(org.slf4j.Logger log,
String xml) |
public static final String SYSTEMID_UNTRUSTED
public static Document parseConfigXML(org.slf4j.Logger log, ResourceLoader loader, String file) throws SAXException, IOException
SAXException
IOException
public static Document parseUntrustedXML(org.slf4j.Logger log, InputStream in) throws SAXException, IOException
SAXException
IOException
public static Document parseUntrustedXML(org.slf4j.Logger log, Reader reader) throws SAXException, IOException
SAXException
IOException
public static Document parseUntrustedXML(org.slf4j.Logger log, String xml) throws SAXException, IOException
SAXException
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.