Package org.jclouds.xml
Interface XMLParser
-
- All Known Implementing Classes:
JAXBParser
public interface XMLParser
Parses XML documents.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_XML_HEADER
The default xml header.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
fromXML(String xml, Class<T> type)
Deserialize the object from xml.String
toXML(Object src)
Serialize the object into xml.<T> String
toXML(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
-
-