uk.co.lakesidetech.springxmldb.processor
Interface IObjectToXMLProcessor

All Known Implementing Classes:
XStreamObjectToXMLProcessor

public interface IObjectToXMLProcessor

The IObjectToXMLProcessor interface defines the methods for the transforming of Object graphs to XML documents and back again. This could be implemented by any of the many technologies for this kind of thing. JAXB, XStream, XMLBeans, Castor

Author:
Stuart Eccles

Method Summary
 org.w3c.dom.Document processToXMLDOM(java.lang.Object obj)
          Convert a Object to an XML W3C DOM Document representation
 java.lang.String processToXMLString(java.lang.Object obj)
          Convert a Object to an XML String representation
 java.lang.Object processXMLToObject(org.w3c.dom.Document xml)
          Process a W3C DOM representation of an XML document to a Java Object.
 java.lang.Object processXMLToObject(java.lang.String xml)
          Process a String representation of an XML document to a Java Object.
 

Method Detail

processToXMLString

public java.lang.String processToXMLString(java.lang.Object obj)
Convert a Object to an XML String representation

Parameters:
obj - The object to convert
Returns:
A String of XML document representing this object

processToXMLDOM

public org.w3c.dom.Document processToXMLDOM(java.lang.Object obj)
Convert a Object to an XML W3C DOM Document representation

Returns:
A DOM of XML document representing this object

processXMLToObject

public java.lang.Object processXMLToObject(java.lang.String xml)
Process a String representation of an XML document to a Java Object.

Parameters:
xml - the XML string
Returns:
a Object representation. NOTE obviously the calling code must be able to deduce what Object type was represented by the XML

processXMLToObject

public java.lang.Object processXMLToObject(org.w3c.dom.Document xml)
Process a W3C DOM representation of an XML document to a Java Object.

Parameters:
xml - the XML DOM
Returns:
a Object representation. NOTE obviously the calling code must be able to deduce what Object type was represented by the XML