org.jclouds.xml
Interface XMLParser

All Known Implementing Classes:
JAXBParser

public interface XMLParser

Parses XML documents.

Author:
Ignasi Barrera

Field Summary
static String DEFAULT_XML_HEADER
          The default xml header.
 
Method Summary
<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


Copyright © 2009-2012 jclouds. All Rights Reserved.