my question is: from the xml scheme :
<topnode>
topNodeValue
<bottomnode/>
</topnode>
generated class with Jaxb looks like
class topnode {
List<bottomnode> bottomnodeList;
}
Which does not generate the value field to set value for topnode.
How can I acheive this? Thanks.
When the contents of an element contain both character and element data it is called mixed content. In JAXB (JSR-222) this is mapped with the
@XmlMixedannotation like:The use of mixed content can be tricky, since you may get unexpected results due to text nodes used for formatting. For a more detailed explanation see the following answer to a similar question.