code: public String getString(Marshaller marshaller, T instance)
        throws JAXBException {
      StringWriter sw = new StringWriter();
      marshaller.marshal(instance, sw);
      String result = sw.toString();
      return result;
    }
docs: get the string representation of the given marshaller
  
  @param marshaller
  @param instance
  @return the string representation for the given marshaller
  @throws JAXBException