code: public static <T> String marshal(final JAXBContext ctx, final T data, final XmlAdapter<?, ?>[] adapters) {
          if (data == null) {
              return null;
          }
          final StringWriter writer = new StringWriter();
          marshal(ctx, data, adapters, writer);
          return writer.toString();
      }
docs: Marshals the given data using a given context. A <code>null</code> data argument returns <code>null</code>.
  
  @param ctx
  Context to use - Cannot be <code>null</code>.
  @param data
  Data to serialize or <code>null</code>.
  @param adapters
  Adapters to associate with the marshaller or <code>null</code> .
  
  @return XML data or <code>null</code>.
  
  @param <T>
  Type of the data.