I have a bunch of XSDs that i transform into POJO with the jaxb maven plugin.
For logging purposes, i'd like to have a "unmarshal" method directly integrated inside the JAXB objects, so that i could call something like generatedPOJO.toXMLString()
, knowing that generatedPOJO
is the POJO generated from the XSD file via JAXB.
I tried to look in the Custom bindings documentation, but i got nothing out of that.
Thank you for your help.
EDIT: What i want is that JAXB, in addition to generating POJOs from XSD files, adds a toXMLString()
method to these POJOs.
This method needs to be generated by JAXB, since i can't edit the generated POJOS.