users@jaxb.java.net

get text using JAXB

From: <alberto.cogolludo_at_celersol.com>
Date: Wed, 25 Feb 2015 10:40:33 +0000 (UTC)

Hi

In my app, I'm reading a xml file (with JAXB) but there is times that I
have empty segments.

I put some examples

<tuv>
    <seg>Unknown: the action taken should always be known</seg>
   </tuv>
Here I read well the tag "seg", I can get all text "Unknown: the action
taken should always be known" but if this text is like this:

<tuv>
    <seg><bpt i="1" x-wb-tag="b1" />Unknown<ept i="1" x-wb-tag="/b1"
/>: the action taken should always be known</seg>
   </tuv>
I don't get anything, my variable is empty and I want to get all text
"<bpt i="1" x-wb-tag="b1" />Unknown<ept i="1" x-wb-tag="/b1" />: the
action taken should always be known"

Could I get this text "<bpt i="1" x-wb-tag="b1" />Unknown<ept i="1"
x-wb-tag="/b1" />: the action taken should always be known" or only
"Unknown: the action taken should always be known" (without tag "ept"
and "bpt"? (I want this like a string)

Note: my variable's value is a "string"

Thanks!