【问题标题】:Android: How we can parse opml String [duplicate]Android:我们如何解析 opml 字符串 [重复]
【发布时间】:2012-06-13 04:50:44
【问题描述】:

可能重复:
Android: How we can get the value from attribute from xml string

我有以下字符串。我想解析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>

如何解析属性并获取textguide_id 的值。 我可以使用哪个解析器来执行此操作?

【问题讨论】:

  • 这是问答网站不是代码生成网站,所以不要要求代码,而是要求相同的提示和指南,否则你会得到反对票,而且问题可能会接近,@ 987654322@

标签: android parsing opml


【解决方案1】:

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

Dom Parsing

【讨论】:

  • 这个xml和我提供的那个xml不一样。你能提供一些关于解析类型、文本和guide_id的指导吗......!!!
  • 在上面的示例链接中,“类别”与类型、文本和指南 ID 相同,因此使用该类型的解析来解析类型、文本和指南 ID。
猜你喜欢
  • 2023-03-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-10-02
  • 2011-07-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多