你好,抱歉我的英语不好。 查看我正在尝试解析的 XML:
<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>
SimpleXML 代码如下:
public class Author_feed {
@Element
private String name;
@ElementList(inline = true)
@Namespace (prefix = "y")
private List<Link_feed> link;
}
但是我看到一个错误:
Element 'link' is already used...[and points to the second "link" line]
我该怎么办?
最佳答案
我找到了这个链接 Android, org.simpleframework.xml Persistence Exception, Element 'foo' is already used
尝试使用 @ElementList(entry="link", inline=true)
另一个可能有用的引用是 Annotation Type ElementList
关于java - 简单的 : Element 'link' is already used,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18023830/