Can JAXB marshal by containment at first then marshal by @XmlIDREF for subsequent references?
You can leverage the concept of JAXB’s XmlAdapter to do something like the following: input.xml The following is the XML document I will use for this example. The 3rd phone-number entry is a reference to the 1st phone-number entry, and the 5th phone-number entry is a reference to the 4th.: <?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?> <customer> … Read more