code: public static <T> String marshal(String rootName, Collection<T> c) throws JAXBException {
      StringWriter sw = new StringWriter();
      marshal(rootName, c, sw);
      return sw.toString();
    }
docs: Convert a collection to a string.
  
  @param rootName Name of the XML root element
  @param c Collection that needs to be marshalled
  @return String representation of the collection