[Simple-support] Fwd: ElementList that includes null values
Brought to you by:
niallg
|
From: Jorge C. <jms...@gm...> - 2012-06-26 00:46:00
|
Hi,
I am using an @ElementList annotation, but the resulting ArrayList does not
include the empty elements found in the XML - I am "loosing" elements
(empty elements).
It also seems that I cannot use the @ElementArray since there is no way of
telling it that the elements are inline.
The partial XML:
<line id="001">
<column>aaa</column>
<column>bbb</column>
<column></column>
</line>
<line id="002">
<column>111</column>
<column></column>
<column>333</column>
</line>
The partial class:
@Root(name="line")
class Document {
@ElementList(entry="column", inline="true")
private ArrayList<String> columns;
public Document(
@ElementList(entry="column", inline="true") ArrayList<String> columns
) {
this.columns = columns;
}
}
Is there anyway to get the resulting ArrayList to include the empty </column>
elements?
Thanks and Kind Regards,
Bokie
|