質問

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?

役に立ちましたか?

解決

This worked:

@ElementList(inline = true, name = "item")
private List<String> items;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top