public class XmlUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XmlUtil.JstlEntityResolver
JSTL-specific implementation of EntityResolver, used by parsers.
|
static class |
XmlUtil.JstlUriResolver
JSTL-specific implementation of URIResolver, used by transformers.
|
Constructor and Description |
---|
XmlUtil() |
Modifier and Type | Method and Description |
---|---|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder()
Create a new DocumentBuilder configured for namespaces but not validating.
|
static org.w3c.dom.Document |
newEmptyDocument()
Create a new empty document.
|
static org.xml.sax.InputSource |
newInputSource(java.io.Reader reader,
java.lang.String systemId)
Create an InputSource from a Reader.
|
static javax.xml.transform.sax.SAXSource |
newSAXSource(java.io.Reader reader,
java.lang.String systemId,
XmlUtil.JstlEntityResolver entityResolver)
Create a SAXSource from a Reader.
|
static javax.xml.transform.Transformer |
newTransformer(javax.xml.transform.Source source)
Create a new Transformer from an XSLT.
|
static javax.xml.transform.sax.TransformerHandler |
newTransformerHandler()
Create a new TransformerHandler.
|
static org.xml.sax.XMLReader |
newXMLReader(XmlUtil.JstlEntityResolver entityResolver)
Create an XMLReader that resolves entities using JSTL semantics.
|
public static org.w3c.dom.Document newEmptyDocument()
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder()
public static javax.xml.transform.sax.TransformerHandler newTransformerHandler() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public static javax.xml.transform.Transformer newTransformer(javax.xml.transform.Source source) throws javax.xml.transform.TransformerConfigurationException
source
- the source of the XSLT.javax.xml.transform.TransformerConfigurationException
- if there was a problem creating the Transformer from the XSLTpublic static org.xml.sax.InputSource newInputSource(java.io.Reader reader, java.lang.String systemId)
reader
- the source of the XMLsystemId
- the system idpublic static org.xml.sax.XMLReader newXMLReader(XmlUtil.JstlEntityResolver entityResolver) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
entityResolver
- for resolving using JSTL semanticsjavax.xml.parsers.ParserConfigurationException
- if there was a configuration problem creating the readerorg.xml.sax.SAXException
- if there was a problem creating the readerpublic static javax.xml.transform.sax.SAXSource newSAXSource(java.io.Reader reader, java.lang.String systemId, XmlUtil.JstlEntityResolver entityResolver) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
reader
- the source of the XMLsystemId
- the system identityResolver
- for resolving using JSTL semamticsjavax.xml.parsers.ParserConfigurationException
- if there was a configuration problem creating the sourceorg.xml.sax.SAXException
- if there was a problem creating the sourceCopyright © 2014–2020. All rights reserved.