【发布时间】:2013-04-06 19:07:58
【问题描述】:
<?xml version="1.0" encoding="UTF-8"?>
<feed>
<entry>
<id>1</id>
<name>Margherita</name>
<cost>155</cost>
<description>Single cheese topping</description>
<list>
<author>PPShein</author>
<authorurl>http://www.ppshein.net</authorurl>
</list>
</entry>
<entry>
<id>2</id>
<name>Double Cheese Margherita</name>
<cost>225</cost>
<description>Loaded with Extra Cheese</description>
<list>
<author>Mike</author>
<authorurl>http://www.mike.net</authorurl>
</list>
</entry>
</feed>
我在解析上述 XML 文件时遇到问题。我用android的this example解析“id、name、cost和discription”就可以了。
但是对于<author> 和<authorurl> 标签,上面的链接示例无法完成我的任务。请帮助我如何解析这个 XML 文件的子标签。
【问题讨论】:
标签: android xml-parsing