code: public Marshaller getMarshaller(T instance) throws JAXBException {
      JAXBContext context = JAXBContext.newInstance(instance.getClass());
      Marshaller marshaller = context.createMarshaller();
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
      return marshaller;
    }
docs: get a marshaller for the given <T> instance
  
  @param instance
  - the instance to get a marshaller for
  @return a marshaller for <T>
  @throws JAXBException