public interface XmlSerializer
Field
annotationsModifier and Type | Method and Description |
---|---|
<T> T |
fromXml(java.io.Reader xmlReader,
java.lang.Class<T> clazz)
Reads an XML document from a
Reader and converts it into an object of the specified type |
<T> T |
fromXml(java.lang.String xml,
java.lang.Class<T> clazz)
Reads a XML document and converts it into an object of the specified type
|
<T> java.lang.String |
toXml(T object)
Writes a XML document by searching the object for
Field annotations |
<T> void |
toXml(T object,
java.io.Writer writer)
Writes a XML document to a
Writer by searching the object for Field annotations |
<T> T fromXml(java.lang.String xml, java.lang.Class<T> clazz) throws SerializationException
xml
- The XML documentclazz
- The Class
to convert the document toSerializationException
- Thrown when the data is invalid<T> T fromXml(java.io.Reader xmlReader, java.lang.Class<T> clazz) throws SerializationException
Reader
and converts it into an object of the specified typexmlReader
- The input stream reading the XML documentclazz
- The Class
to convert the document toSerializationException
- Thrown when the data is invalid<T> java.lang.String toXml(T object) throws SerializationException
Field
annotationsobject
- The object to convert to XMLSerializationException
- Thrown when the object is invalid<T> void toXml(T object, java.io.Writer writer) throws SerializationException
Writer
by searching the object for Field
annotationsobject
- The object to convert to XMLwriter
- The stream to write the XML document toSerializationException
- Thrown when the object is invalid