code: public static Object toObject(final String xml) {
  		// XStream x = createXStream();
  		// return x.fromXML(xml);
  		// try {
  		final ByteArrayInputStream out = new ByteArrayInputStream(xml.getBytes());
  		final XMLDecoder encoder = new XMLDecoder(out);
  		final Object object = encoder.readObject();
  		//
  		encoder.close();
  		return object;
  		// } catch (Exception e) {
  		// System.err.println("Failed to decode object : \n" + xml);
  		// return null;
  		// }
  		// return null;
  	}
docs: To object.
  
  @param xml the xml
  @return the object