public final class JRXmlUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_DOCUMENT_BUILDER_FACTORY_CREATION_FAILURE |
static String |
EXCEPTION_MESSAGE_KEY_DOCUMENT_PARSING_FAILURE |
static String |
FEATURE_DISALLOW_DOCTYPE |
static String |
PROPERTY_ALLOW_DOCTYPE |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
allowDoctype() |
static Document |
createDocument(Node sourceNode) |
static Document |
createDocument(Node sourceNode,
boolean isNamespaceAware)
Creates a document having a node as root.
|
static DocumentBuilder |
createDocumentBuilder() |
static DocumentBuilder |
createDocumentBuilder(boolean isNamespaceAware)
Creates a XML document builder.
|
static Document |
parse(File file) |
static Document |
parse(File file,
boolean isNamespaceAware)
Parses a file into a document.
|
static Document |
parse(InputSource is) |
static Document |
parse(InputSource is,
boolean isNamespaceAware)
Parses an input source into a document.
|
static Document |
parse(InputStream is) |
static Document |
parse(InputStream is,
boolean isNamespaceAware)
Parses an input stream into a XML document.
|
static Document |
parse(String uri) |
static Document |
parse(String uri,
boolean isNamespaceAware)
Parses a document specified by an URI.
|
static Document |
parse(URL url) |
static Document |
parse(URL url,
boolean isNamespaceAware)
Parses an URL stream as a XML document.
|
public static final String EXCEPTION_MESSAGE_KEY_DOCUMENT_BUILDER_FACTORY_CREATION_FAILURE
public static final String EXCEPTION_MESSAGE_KEY_DOCUMENT_PARSING_FAILURE
public static final String PROPERTY_ALLOW_DOCTYPE
public static final String FEATURE_DISALLOW_DOCTYPE
public static Document parse(InputSource is) throws JRException
JRException
public static Document parse(InputSource is, boolean isNamespaceAware) throws JRException
is
- the input sourceJRException
public static Document parse(String uri) throws JRException
JRException
public static Document parse(String uri, boolean isNamespaceAware) throws JRException
uri
- the URIJRException
public static Document parse(File file) throws JRException
JRException
public static Document parse(File file, boolean isNamespaceAware) throws JRException
file
- the XML fileJRException
public static Document parse(InputStream is) throws JRException
JRException
public static Document parse(InputStream is, boolean isNamespaceAware) throws JRException
is
- the input streamJRException
public static Document parse(URL url) throws JRException
JRException
public static Document parse(URL url, boolean isNamespaceAware) throws JRException
url
- the URLJRException
public static DocumentBuilder createDocumentBuilder() throws JRException
JRException
public static DocumentBuilder createDocumentBuilder(boolean isNamespaceAware) throws JRException
JRException
protected static boolean allowDoctype()
public static Document createDocument(Node sourceNode) throws JRException
JRException
public static Document createDocument(Node sourceNode, boolean isNamespaceAware) throws JRException
sourceNode
- the nodeJRException
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.