1

可能重复:
Android:我们如何从 xml 字符串的属性中获取值

我有以下字符串。我想解析attribute of outline.

<opml version="1">
<head>
<status>200</status>
</head>
<body>
<outline type="text" text="General" guide_id="f1" is_default="true"/>
<outline type="text" text="Rock Stations" guide_id="f2"/>
<outline type="text" text="Rock Stations" guide_id="f3"/>
<outline type="text" text="Rock" guide_id="f4"/>
<outline type="text" text="Awdhesh" guide_id="f5"/>
</body>
</opml>

我如何解析属性并获取 and 的textguide_id。我可以使用哪个解析器来做到这一点?

4

1 回答 1

0

为此使用 Dom Parser,下面是 Dom Parser 示例的链接。

DOM解析

于 2012-06-13T05:08:55.120 回答