Parsing XML feed die with “Element is already used”

≡放荡痞女 提交于 2019-11-28 10:53:01

This fixes the problem:

Remove this:

@Element(name = "title", required = false)

Replace with:

//inside the inner class RssItem
@Path("title")
@Text(required=false)
public String title = "";

This should be repeated for any other field that gets the exception.

Rossiar

It appears that using

@Element(name = "title", required = false, inLine=true)
public String title = "";

will solve your problem, as shown here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!