protected static class SecureGenericXMLFactory.SecureDocumentBuilderFactory
extends javax.xml.parsers.DocumentBuilderFactory
| Modifier | Constructor and Description |
|---|---|
protected |
SecureGenericXMLFactory.SecureDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory factory)
Constructs a new SecureDocumentBuilderFactory instance that delegates
most functionality to an existing instance, but overrides where
needed to protect against XXE attacks.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name) |
boolean |
getFeature(java.lang.String name) |
javax.xml.validation.Schema |
getSchema() |
boolean |
isCoalescing() |
boolean |
isExpandEntityReferences() |
boolean |
isIgnoringComments() |
boolean |
isIgnoringElementContentWhitespace() |
boolean |
isIncludeAware() |
boolean |
isNamespaceAware() |
boolean |
isValidating() |
javax.xml.parsers.DocumentBuilder |
newDocumentBuilder() |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setCoalescing(boolean coalescing) |
void |
setExpandEntityReferences(boolean expandEntityRef) |
void |
setFeature(java.lang.String name,
boolean value) |
void |
setIgnoringComments(boolean ignoreComments) |
void |
setIgnoringElementContentWhitespace(boolean whitespace) |
void |
setNamespaceAware(boolean awareness) |
void |
setSchema(javax.xml.validation.Schema schema) |
void |
setValidating(boolean validating) |
void |
setXIncludeAware(boolean state) |
protected SecureGenericXMLFactory.SecureDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory factory)
factory - the existing DocumentBuilderFactory that should be
secured.public javax.xml.parsers.DocumentBuilder newDocumentBuilder()
throws javax.xml.parsers.ParserConfigurationException
newDocumentBuilder in class javax.xml.parsers.DocumentBuilderFactoryjavax.xml.parsers.ParserConfigurationExceptionpublic void setNamespaceAware(boolean awareness)
setNamespaceAware in class javax.xml.parsers.DocumentBuilderFactorypublic void setValidating(boolean validating)
setValidating in class javax.xml.parsers.DocumentBuilderFactorypublic void setIgnoringElementContentWhitespace(boolean whitespace)
setIgnoringElementContentWhitespace in class javax.xml.parsers.DocumentBuilderFactorypublic void setExpandEntityReferences(boolean expandEntityRef)
setExpandEntityReferences in class javax.xml.parsers.DocumentBuilderFactorypublic void setIgnoringComments(boolean ignoreComments)
setIgnoringComments in class javax.xml.parsers.DocumentBuilderFactorypublic void setCoalescing(boolean coalescing)
setCoalescing in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isNamespaceAware()
isNamespaceAware in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isValidating()
isValidating in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isIgnoringElementContentWhitespace()
isIgnoringElementContentWhitespace in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isExpandEntityReferences()
isExpandEntityReferences in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isIgnoringComments()
isIgnoringComments in class javax.xml.parsers.DocumentBuilderFactorypublic boolean isCoalescing()
isCoalescing in class javax.xml.parsers.DocumentBuilderFactorypublic void setAttribute(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException
setAttribute in class javax.xml.parsers.DocumentBuilderFactoryjava.lang.IllegalArgumentExceptionpublic java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
getAttribute in class javax.xml.parsers.DocumentBuilderFactoryjava.lang.IllegalArgumentExceptionpublic void setFeature(java.lang.String name,
boolean value)
throws javax.xml.parsers.ParserConfigurationException
setFeature in class javax.xml.parsers.DocumentBuilderFactoryjavax.xml.parsers.ParserConfigurationExceptionpublic boolean getFeature(java.lang.String name)
throws javax.xml.parsers.ParserConfigurationException
getFeature in class javax.xml.parsers.DocumentBuilderFactoryjavax.xml.parsers.ParserConfigurationExceptionpublic javax.xml.validation.Schema getSchema()
throws java.lang.UnsupportedOperationException
getSchema in class javax.xml.parsers.DocumentBuilderFactoryjava.lang.UnsupportedOperationExceptionpublic void setSchema(javax.xml.validation.Schema schema)
throws java.lang.UnsupportedOperationException
setSchema in class javax.xml.parsers.DocumentBuilderFactoryjava.lang.UnsupportedOperationExceptionpublic void setXIncludeAware(boolean state)
throws java.lang.UnsupportedOperationException
setXIncludeAware in class javax.xml.parsers.DocumentBuilderFactoryjava.lang.UnsupportedOperationExceptionpublic boolean isIncludeAware()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException