Java XML JAXB Marshaller marshal(Object object)

Here you can find the source of marshal(Object object)

Description

marshal

License

Apache License

Declaration

public static String marshal(Object object) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import javax.xml.bind.JAXB;

import java.io.StringWriter;

public class Main {
    public static String marshal(Object object) {
        StringWriter writer = new StringWriter();
        JAXB.marshal(object, writer);
        return writer.toString();
    }/*from   ww w .j  a  v  a 2  s .c  o  m*/
}

Related

  1. marshal(Object obj, OutputStream out)
  2. marshal(Object obj, OutputStream out, Class... boundClasses)
  3. marshal(Object obj, OutputStream stream)
  4. marshal(Object object)
  5. marshal(Object object)
  6. marshal(Object object, File file, JAXBContext ctx)
  7. marshal(Object object, OutputStream stream)
  8. marshal(Object objectToMarshal)
  9. marshal(Object source, Class configurationClass)