public class XmlDataReader
extends java.lang.Object
It is possible, during loading, to:
| Modifier and Type | Class | Description |
|---|---|---|
static class |
XmlDataReader.Feature |
| Modifier and Type | Field | Description |
|---|---|---|
protected AttributePredicate |
attributeFilter |
|
protected AttributeNameConverter |
attributeNameConverter |
|
protected AttributeValueConverter |
attributeValueConverter |
|
static cdc.util.lang.Cache<java.lang.String> |
CACHE |
The cache of strings used to share attributes and elements names.
|
protected ElementPredicate |
elementFilter |
|
protected ElementNameConverter |
elementNameConverter |
|
protected static org.apache.logging.log4j.Logger |
LOGGER |
| Constructor | Description |
|---|---|
XmlDataReader() |
| Modifier and Type | Method | Description |
|---|---|---|
static XmlDataReader |
create(XmlDataReader.Feature... features) |
|
AttributePredicate |
getAttributeFilter() |
|
AttributeNameConverter |
getAttributeNameConverter() |
|
AttributeValueConverter |
getAttributeValueConverter() |
|
ElementPredicate |
getElementFilter() |
|
ElementNameConverter |
getElementNameConverter() |
|
boolean |
isEnabled(XmlDataReader.Feature feature) |
|
static Document |
load(java.io.File file,
XmlDataReader.Feature... features) |
|
static Document |
load(java.io.InputStream is,
XmlDataReader.Feature... features) |
|
static Document |
load(java.io.InputStream is,
java.lang.String systemId,
XmlDataReader.Feature... features) |
|
static Document |
load(java.lang.String filename,
XmlDataReader.Feature... features) |
|
static Document |
load(java.net.URL url,
XmlDataReader.Feature... features) |
|
static Element |
loadRoot(java.io.File file,
XmlDataReader.Feature... features) |
|
static Element |
loadRoot(java.io.InputStream is,
XmlDataReader.Feature... features) |
|
static Element |
loadRoot(java.io.InputStream is,
java.lang.String systemId,
XmlDataReader.Feature... features) |
|
static Element |
loadRoot(java.lang.String filename,
XmlDataReader.Feature... features) |
|
static Element |
loadRoot(java.net.URL url,
XmlDataReader.Feature... features) |
|
Document |
read(java.io.File file) |
Reads a file.
|
Document |
read(java.io.InputStream is) |
|
Document |
read(java.io.InputStream is,
java.lang.String systemId) |
Reads an InputStream.
|
Document |
read(java.lang.String filename) |
Reads a file.
|
Document |
read(java.net.URL url) |
Reads an URL.
|
Element |
readRoot(java.io.File file) |
Reads a file.
|
Element |
readRoot(java.io.InputStream is) |
|
Element |
readRoot(java.io.InputStream is,
java.lang.String systemId) |
Reads an InputStream.
|
Element |
readRoot(java.lang.String filename) |
Reads a file.
|
Element |
readRoot(java.net.URL url) |
Reads an URL.
|
void |
setAttributeFilter(AttributePredicate filter) |
|
void |
setAttributeNameConverter(AttributeNameConverter converter) |
|
void |
setAttributeValueConverter(AttributeValueConverter converter) |
|
void |
setElementFilter(ElementPredicate filter) |
|
void |
setElementNameConverter(ElementNameConverter converter) |
|
void |
setEnabled(XmlDataReader.Feature feature,
boolean enabled) |
public static final cdc.util.lang.Cache<java.lang.String> CACHE
protected static final org.apache.logging.log4j.Logger LOGGER
protected AttributePredicate attributeFilter
protected AttributeNameConverter attributeNameConverter
protected AttributeValueConverter attributeValueConverter
protected ElementPredicate elementFilter
protected ElementNameConverter elementNameConverter
public boolean isEnabled(XmlDataReader.Feature feature)
public void setEnabled(XmlDataReader.Feature feature, boolean enabled)
public AttributePredicate getAttributeFilter()
public void setAttributeFilter(AttributePredicate filter)
public AttributeNameConverter getAttributeNameConverter()
public void setAttributeNameConverter(AttributeNameConverter converter)
public AttributeValueConverter getAttributeValueConverter()
public void setAttributeValueConverter(AttributeValueConverter converter)
public ElementPredicate getElementFilter()
public void setElementFilter(ElementPredicate filter)
public ElementNameConverter getElementNameConverter()
public void setElementNameConverter(ElementNameConverter converter)
public Document read(java.io.InputStream is) throws java.io.IOException
java.io.IOExceptionpublic Element readRoot(java.io.InputStream is) throws java.io.IOException
java.io.IOExceptionpublic Document read(java.io.InputStream is, java.lang.String systemId) throws java.io.IOException
is - The InputStream.systemId - The systemId which is needed for resolving relative URIs.java.io.IOException - When an IO error occurs.public Element readRoot(java.io.InputStream is, java.lang.String systemId) throws java.io.IOException
is - The InputStream.systemId - The systemId which is needed for resolving relative URIs.java.io.IOException - When an IO error occurs.public Document read(java.net.URL url) throws java.io.IOException
url - The URL.java.io.IOException - When an IO error occurs.public Element readRoot(java.net.URL url) throws java.io.IOException
url - The URL.java.io.IOException - When an IO error occurs.public Document read(java.lang.String filename) throws java.io.IOException
filename - The file name.java.io.IOException - When an IO error occurs.public Element readRoot(java.lang.String filename) throws java.io.IOException
filename - The file name.java.io.IOException - When an IO error occurs.public Document read(java.io.File file) throws java.io.IOException
file - The file.java.io.IOException - When an IO error occurs.public Element readRoot(java.io.File file) throws java.io.IOException
file - The file.java.io.IOException - When an IO error occurs.public static XmlDataReader create(XmlDataReader.Feature... features)
public static Document load(java.io.InputStream is, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Element loadRoot(java.io.InputStream is, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Document load(java.io.InputStream is, java.lang.String systemId, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Element loadRoot(java.io.InputStream is, java.lang.String systemId, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Document load(java.net.URL url, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Element loadRoot(java.net.URL url, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Document load(java.lang.String filename, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Element loadRoot(java.lang.String filename, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Document load(java.io.File file, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionpublic static Element loadRoot(java.io.File file, XmlDataReader.Feature... features) throws java.io.IOException
java.io.IOExceptionCopyright © 2018. All rights reserved.