Quantcast
Channel: Metro and JAXB Related Items on Java.net
Viewing all articles
Browse latest Browse all 171

Using JAXB to unmarshal xml to an existing prepopulated object

$
0
0

Is there a way to use JAXB to unmarshal source XML to an existing JAXB annotated object containing data (an object that i have previously instantiated and populated with data)? So when I call the unmarshal() method it merges the data in the existing pre-popluated object with data in the source XML? It effect, it updates the Java object with data in the source XML.

It appears I can only unmarshal to an new empty object that JAXB instantiates based on the class I pass in the newInstance() method.


Viewing all articles
Browse latest Browse all 171

Trending Articles