O - the type of object to be build by the reader.public interface Xpp3Reader<O>
getType().
The implementations of such readers must be register in a file
META-INF/services.org.nuiton.io.xpp3.Xpp3Readerto make possible auto-discovering of availables reader at runtime. See
Xpp3Helper.getReader(Class) and
Xpp3Helper.getReaders().| Modifier and Type | Method and Description |
|---|---|
String |
getArrayRootTagName() |
String |
getRootTagName() |
Class<O> |
getType() |
boolean |
isAddDefaultEntities() |
O |
read(Reader reader)
Read a single instance of the typed object and return it.
|
O |
read(Reader reader,
boolean strict)
Read a single instance of the typed object and return it.
|
<T> T |
read(String rootTagName,
Class<T> type,
org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
boolean strict) |
O[] |
readArray(Reader reader)
Read some instances of the typed object and return it.
|
O[] |
readArray(Reader reader,
boolean strict)
Read some instances of the typed object and return it.
|
<T> T[] |
readArray(String parentRootTagName,
String rootTagName,
Class<T> type,
org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
boolean strict) |
void |
setAddDefaultEntities(boolean addDefaultEntities)
Set the new value of the
defaultEntities flag. |
void |
setParentRootTagName(String parentRootTagName)
Set the name of the root tag for an array of object to read.
|
void |
setRootTagName(String rootTagName)
Set the name of the root tag of an object to read.
|
O read(Reader reader) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
read(Reader, boolean) in strict mode.
In the xml stream, the root tag must be the getRootTagName().
Example :
<issue>
...
</issue>
reader - the xml input readerIOException - if any io pborg.codehaus.plexus.util.xml.pull.XmlPullParserException - if parsing errorO read(Reader reader, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
getRootTagName().
Example :
<issue>
...
</issue>
reader - the xml input readerstrict - flag to be strict while parsingIOException - if any io pborg.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pbO[] readArray(Reader reader) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
getArrayRootTagName().
Note : this is a convinient method to call :
readArray(Reader, boolean) in stritc mode.
Example :
<issues>
<issue>
...
</issue>
</issues>
reader - the xml input readerIOException - if any io pborg.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pbO[] readArray(Reader reader, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
getArrayRootTagName().
Example :
<issues>
<issue>
...
</issue>
</issues>
reader - the xml input readerstrict - flag to be strict while parsingIOException - if any io pborg.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pbString getRootTagName()
void setRootTagName(String rootTagName)
rootTagName - the name of the tagString getArrayRootTagName()
void setParentRootTagName(String parentRootTagName)
parentRootTagName - the name of the tagboolean isAddDefaultEntities()
true if parser will load the default entities,
false otherwise.void setAddDefaultEntities(boolean addDefaultEntities)
defaultEntities flag.addDefaultEntities - the new value.<T> T[] readArray(String parentRootTagName, String rootTagName, Class<T> type, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException<T> T read(String rootTagName, Class<T> type, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOExceptionCopyright © 2009–2016 CodeLutin. All rights reserved.