Hi,
is there an easy approach to store my model, which I use with EclipseLink, in XML files?
I want to implement an export functionality in my program and I was wondering if this can be done with eclipselink or with any other framework.
Thanks
Hi,
is there an easy approach to store my model, which I use with EclipseLink, in XML files?
I want to implement an export functionality in my program and I was wondering if this can be done with eclipselink or with any other framework.
Thanks
Take a look at the EclipseLink MOXy component ( http://www.eclipse.org/eclipselink/moxy.php ). This will easily allow you to map your existing POJO's to XML.
Depending on the complexity of your data model, using JAXB should be a relatively easy way to marshal (export) your objects to XML. You will have to annotate your entities with @XmlRootElement
or @XmlType
and your fields with @XmlElement
or @XmlAttribute
.