|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.security.xml.SecureXmlParserFactory
public final class SecureXmlParserFactory
Utility methods to produce parsers suitable for untrusted XML. These cover the core parsing APIs included
in JDK 1.6. Other factories in com.atlassian.security.xml.libs can create parsers for other libraries.
Parsers will have FEATURE_SECURE_PROCESSING enabled and be configured to ignore external resources used for, or in, DTDs.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_LOAD_EXTERNAL
|
static String |
FEATURE_EXTERNAL_GENERAL_ENTITIES
|
static String |
FEATURE_EXTERNAL_PARAMETER_ENTITIES
|
| Method Summary | |
|---|---|
static SAXParserFactory |
createSAXParserFactory()
Create a new SAX SAXParserFactory suitable for parsing XML from an untrusted source |
static EntityResolver |
emptyEntityResolver()
Create a new EntityResolver that will resolve every entity to an empty stream, rather
than fetching resources from the network. |
static DocumentBuilder |
newDocumentBuilder()
Create a new DOM DocumentBuilder suitable for parsing XML from an untrusted source. |
static DocumentBuilderFactory |
newDocumentBuilderFactory()
|
static DocumentBuilder |
newNamespaceAwareDocumentBuilder()
Create a new namespace-aware DOM DocumentBuilder suitable for parsing XML from an untrusted source. |
static XMLReader |
newNamespaceAwareXmlReader()
Create a new namespace-aware SAX XMLReader suitable for parsing XML from an untrusted source. |
static XMLInputFactory |
newXmlInputFactory()
Create a new StAX XMLInputFactory suitable for parsing XML from an untrusted source. |
static XMLReader |
newXmlReader()
Create a new SAX XMLReader suitable for parsing XML from an untrusted source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTRIBUTE_LOAD_EXTERNAL
public static final String FEATURE_EXTERNAL_GENERAL_ENTITIES
public static final String FEATURE_EXTERNAL_PARAMETER_ENTITIES
| Method Detail |
|---|
public static DocumentBuilderFactory newDocumentBuilderFactory()
public static DocumentBuilder newDocumentBuilder()
DocumentBuilder suitable for parsing XML from an untrusted source.
public static SAXParserFactory createSAXParserFactory()
throws SAXException,
ParserConfigurationException
SAXParserFactory suitable for parsing XML from an untrusted source
SAXParserFactory
SAXException
ParserConfigurationExceptionpublic static XMLReader newXmlReader()
XMLReader suitable for parsing XML from an untrusted source.
public static XMLReader newNamespaceAwareXmlReader()
XMLReader suitable for parsing XML from an untrusted source.
public static DocumentBuilder newNamespaceAwareDocumentBuilder()
DocumentBuilder suitable for parsing XML from an untrusted source.
public static XMLInputFactory newXmlInputFactory()
XMLInputFactory suitable for parsing XML from an untrusted source.
public static EntityResolver emptyEntityResolver()
EntityResolver that will resolve every entity to an empty stream, rather
than fetching resources from the network.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||