DEFAULT_XML_HEADER
Constructor and Description |
---|
JAXBParser(String prettyPrint) |
Modifier and Type | Method and 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.
|
@Inject public JAXBParser(String prettyPrint)
public String toXML(Object src) throws IOException
XMLParser
toXML
in interface XMLParser
IOException
public <T> String toXML(Object src, Class<T> type) throws IOException
XMLParser
toXML
in interface XMLParser
IOException
public <T> T fromXML(String xml, Class<T> type) throws IOException
XMLParser
fromXML
in interface XMLParser
IOException
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.