1

Hello and sorry for my bad English. Look at the XML I'm trying to parse:

<author>
<name>Name</name>
<y:link href="http://api-yaru.yandex.ru/person/20623655/" rel="self"/>
<y:link href="http://upics.yandex.net/20623655/normal" rel="userpic"/>
</author>

And SimpleXML code looks like:

public class Author_feed {
@Element
private String name;

@ElementList(inline = true)
@Namespace (prefix = "y")
private List<Link_feed> link;
}

Hovewer I see an error:

Element 'link' is already used...[and points to the second "link" line]

What shall I do?

IMSoP
  • 89,526
  • 13
  • 117
  • 169
Groosha
  • 2,897
  • 2
  • 22
  • 38

1 Answers1

3

I have found this link Android, org.simpleframework.xml Persistence Exception, Element 'foo' is already used

try using @ElementList(entry="link", inline=true)

Another reference that might be helpful is Annotation Type ElementList

Community
  • 1
  • 1
Kinaan Khan Sherwani
  • 1,504
  • 16
  • 28