jaxb-tools
jaxb-tools copied to clipboard
Parsing mixed content only provides partial data
I'm parsing a public dataset of scientific articles the DTD of which has the following definition for the title:
<!ENTITY % text "#PCDATA | b | i | sup | sub | u" >
<!ELEMENT ArticleTitle (%text; | mml:math)*>
<!ATTLIST ArticleTitle %booklinkatts; >
This is mapped to a class with several attributes and an @XmlValue annotated String field. When parsing xml data this yields only the last bit of content after the final nested tag. For example, this input:
<ArticleTitle>Sterols regulate endocytic pathways during flg22-induced defense responses in <i>Arabidopsis</i>.</ArticleTitle>
Results in an articletitle containing just the final dot. Do I need to setup some kind of custom handling or configuration for this field, or is this an issue with the plugin?
This is not an issue with the plugin. The plugin is just a wrapper for XJC. So most probably this is an issue with XJC.