Skip to content

Instantly share code, notes, and snippets.

@bugs84
Last active December 14, 2015 01:09
Show Gist options
  • Save bugs84/5004604 to your computer and use it in GitHub Desktop.
Save bugs84/5004604 to your computer and use it in GitHub Desktop.
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(new JAXBElement<MyClass>(new QName("NameSpaceUri","ElementName"), MyClass.class, myClassInstance), System.out);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment