package it.paninoonto.xml;
import org.json.JSONObject;
/**
* An interface tagging a class which can be serialized/deserialized to/from an
* XML
* document.
*
* @author Mirko Luchi
*
*/
public interface XMLSerializable {
/**
* Write the content of this class to a {@link JSONObject}.
* @return The XML object.
*/
public String toXML() throws Exception;
/**
* Write the content of the given {@link JSONObject} to this class.
* @param xml The XML root element.
*/
public void fromXML(String xml) throws Exception;
}
|