سؤال

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