Frage

I'm loading an external XML similar to this:

<list>
    <item>test</item>
    <item>test</item>
    <item>test</item>
    <summary>3</summary>
</list>

How can I annotate a private List<String> items; field so that the Simple framework deserializes the three item tags but not the summary tag?

War es hilfreich?

Lösung

This worked:

@ElementList(inline = true, name = "item")
private List<String> items;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top