code: public static <T> String marshal(T obj) throws JAXBException {
      StringWriter sw = new StringWriter();
      marshal(obj, sw);
      return sw.toString();
    }
docs: Convert an object to a string.
  
  @param obj Object that needs to be serialized / marshalled.
  @return String representation of obj