I have some objects I want to marshal using JAXB. Using @XmlRootElement
and @XmlAccessorType(XmlAccessType.FIELD)
it’s easy. However, I would much prefer not to change the class in question since the code in question is outside of my responsibility and I need to marshal it only for debugging purposes.
Using the article JAXB - No Annotations Required I got rid of the @XmlRootElement
, but how can I configure the field access programmatically? Is there any standard way?