@Private
@Unstable
public class XMLUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
CREATE_ENTITY_REF_NODES |
|
static java.lang.String |
DISALLOW_DOCTYPE_DECL |
|
static java.lang.String |
EXTERNAL_GENERAL_ENTITIES |
|
static java.lang.String |
EXTERNAL_PARAMETER_ENTITIES |
|
static java.lang.String |
LOAD_EXTERNAL_DECL |
|
static java.lang.String |
VALIDATION |
| Constructor | Description |
|---|---|
XMLUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static javax.xml.parsers.DocumentBuilderFactory |
newSecureDocumentBuilderFactory() |
This method should be used if you need a
DocumentBuilderFactory. |
static javax.xml.parsers.SAXParserFactory |
newSecureSAXParserFactory() |
This method should be used if you need a
SAXParserFactory. |
static javax.xml.transform.sax.SAXTransformerFactory |
newSecureSAXTransformerFactory() |
This method should be used if you need a
SAXTransformerFactory. |
static javax.xml.transform.TransformerFactory |
newSecureTransformerFactory() |
This method should be used if you need a
TransformerFactory. |
static void |
transform(java.io.InputStream styleSheet,
java.io.InputStream xml,
java.io.Writer out) |
Transform input xml given a stylesheet.
|
public static final java.lang.String DISALLOW_DOCTYPE_DECL
public static final java.lang.String LOAD_EXTERNAL_DECL
public static final java.lang.String EXTERNAL_GENERAL_ENTITIES
public static final java.lang.String EXTERNAL_PARAMETER_ENTITIES
public static final java.lang.String CREATE_ENTITY_REF_NODES
public static final java.lang.String VALIDATION
public static void transform(java.io.InputStream styleSheet,
java.io.InputStream xml,
java.io.Writer out)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
styleSheet - the style-sheetxml - input xml dataout - outputjavax.xml.transform.TransformerConfigurationException - synopsis signals a problem
creating a transformer object.javax.xml.transform.TransformerException - this is used for throwing processor
exceptions before the processing has started.public static javax.xml.parsers.DocumentBuilderFactory newSecureDocumentBuilderFactory()
throws javax.xml.parsers.ParserConfigurationException
DocumentBuilderFactory. Use this method
instead of DocumentBuilderFactory.newInstance(). The factory that is returned has
secure configuration enabled.DocumentBuilderFactory with secure configuration enabledjavax.xml.parsers.ParserConfigurationException - if the JAXP parser does not support the
secure configurationpublic static javax.xml.parsers.SAXParserFactory newSecureSAXParserFactory()
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
SAXParserFactory. Use this method
instead of SAXParserFactory.newInstance(). The factory that is returned has
secure configuration enabled.SAXParserFactory with secure configuration enabledjavax.xml.parsers.ParserConfigurationException - if the JAXP parser does not support the
secure configurationorg.xml.sax.SAXException - if there are another issues when creating the factorypublic static javax.xml.transform.TransformerFactory newSecureTransformerFactory()
throws javax.xml.transform.TransformerConfigurationException
TransformerFactory. Use this method
instead of TransformerFactory.newInstance(). The factory that is returned has
secure configuration enabled.TransformerFactory with secure configuration enabledjavax.xml.transform.TransformerConfigurationException - if the JAXP transformer does not
support the secure configurationpublic static javax.xml.transform.sax.SAXTransformerFactory newSecureSAXTransformerFactory()
throws javax.xml.transform.TransformerConfigurationException
SAXTransformerFactory. Use this method
instead of TransformerFactory.newInstance(). The factory that is returned has
secure configuration enabled.SAXTransformerFactory with secure configuration enabledjavax.xml.transform.TransformerConfigurationException - if the JAXP transformer does not
support the secure configurationCopyright © 2008–2025 Apache Software Foundation. All rights reserved.