The
Text
annotation is used to represent a field or
method that appears as text within an XML element. Methods and
fields annotated with this must represent primitive values. One
restriction on this annotation is that it can only appear once
within a schema class, and it can not appear with the another XML
element annotations, such as the
Element
annotation.
It can however appear with any number of
Attribute
annotations.
<example one="value" two="value">
Example text value
<example>
Text values are used when an element containing attributes is
used to wrap a text value with no child elements. This can be
used in place of an element annotation to represent a primitive
which is wrapped in a surrounding XML element.