ObjectItem objectItem = ..
JAXBContext jaxbContext = JAXBContext.newInstance(ObjectItem.class);
objectItem= jaxbContext.createUnmarshaller().unmarshal(new JAXBSource(jaxbContext,
new JAXBElement(
new QName("http://comp.namespace/version", "objectItem"),
ObjectItem.class,
objectItem)),ObjectItem.class).getValue();
Wednesday, February 23, 2011
clone jaxb object
To clone any jaxb object including object with out root element annotation do like following
Subscribe to:
Post Comments (Atom)
1 comment:
Thank you very much for sharing this
Works like a charm
Post a Comment