Package org.jclouds.xml
Interface XMLParser
-
- All Known Implementing Classes:
JAXBParser
public interface XMLParserParses XML documents.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_XML_HEADERThe default xml header.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TfromXML(String xml, Class<T> type)Deserialize the object from xml.StringtoXML(Object src)Serialize the object into xml.<T> StringtoXML(Object src, Class<T> type)Serialize the object into xml, as the declared type.
-
-
-
Field Detail
-
DEFAULT_XML_HEADER
static final String DEFAULT_XML_HEADER
The default xml header.- See Also:
- Constant Field Values
-
-
Method Detail
-
toXML
String toXML(Object src) throws IOException
Serialize the object into xml.- Throws:
IOException
-
toXML
<T> String toXML(Object src, Class<T> type) throws IOException
Serialize the object into xml, as the declared type.- Throws:
IOException
-
fromXML
<T> T fromXML(String xml, Class<T> type) throws IOException
Deserialize the object from xml.- Throws:
IOException
-
-