|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
O - the type of object to be build by the reader.public interface Xpp3Reader<O>
A simple contract to mark all xpp readers.
a such reader is associated to agetType().
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(java.lang.Class) and
Xpp3Helper.getReaders().
| Method Summary | |
|---|---|
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. |
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. |
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. |
| Method Detail |
|---|
Class<O> getType()
O read(Reader reader)
throws IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
read(java.io.Reader, boolean) in strict mode.
In the xml stream, the root tag must be the getRootTagName().
Example :
<issue>:
...
</issue>:
reader - the xml input reader
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if parsing error
O 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 parsing
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pb
O[] readArray(Reader reader)
throws IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
getArrayRootTagName().
Note : this is a convinient method to call :
readArray(java.io.Reader, boolean) in stritc mode.
Example :
<issues>:
<issue>:
...
</issue>:
</issues>:
reader - the xml input reader
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pb
O[] 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 parsing
IOException - if any io pb
org.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||