jaxb-tools icon indicating copy to clipboard operation
jaxb-tools copied to clipboard

Parsing mixed content only provides partial data

Open rkpkuipers opened this issue 5 years ago • 1 comments
trafficstars

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?

rkpkuipers avatar Dec 09 '19 10:12 rkpkuipers

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.

highsource avatar Dec 09 '19 12:12 highsource