Xml – Remove ‘standalone=”yes”‘ from generated XML

jaxbxmlxml-bindingxsd

Do you know of a JAXB setting to prevent standalone="yes" from being generated in the resulting XML?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Best Solution

in JAXB that is part of JDK1.6

marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);