Would anyone have a
suggestion as to how I could model the following XML:
<paratext>
Line One.
<footnote.reference refid="1" />
Line Two.
<footnote.reference refid="2" />
Line Three.
</paratext>
Line One.
<footnote.reference refid="1" />
Line Two.
<footnote.reference refid="2" />
Line Three.
</paratext>
Ideally I would like
to capture the entire content of the "paratext" element as a
string.
Then bind each
"footnote.reference" element into a collection.
I've tried the
following binding definition (simplified version):
<mapping
name="paratext" class="model.ParaText" ordered="true">
<value field="text" set-method="setText" usage="optional" style="text" />
<collection
field="footnoteEntries" usage="optional"
item-type="model.FootnoteReference" />
</mapping>
<mapping name="footnote.reference" class="model.FootnoteReference" ordered="false">
<value style="attribute"
name="refid" field="refId" usage="optional"/>
</mapping>
But with this
binding, I'm able to collect the footnote entries, but only able to capture as a
string the first line ("Line
One.").
Any thoughts on how to go about
this?
Would this require a custom
unmarshaller?
-
Geoff
