Seems like this question is kind of duplicate with another one, where I've collect some marshal/unmarshal solutions into one post. You may check it here: Dynamic tag names with JAXB.
In short:
@xmlAnyElement
should be createdXmlAdapter
can be used in pair with @XmlJavaTypeAdapter
to
convert between the container class and Map<>;