JAXB Marshalling a variable list of elements with the same name JAXB Marshalling a variable list of elements with the same name xml xml

JAXB Marshalling a variable list of elements with the same name


You need to do the following:

  • annotate the element property on the Element class with @XmlValue.
  • make sure the case of the element names in the annotations matches the names in the XML document.

For More Information