Android XML Parse

时间:2015-08-28 09:47:10

标签: android android-xml

我需要解析一个看似不符合标准格式的XMl文档,我该如何在Java中做到这一点?这是XM文件的一部分:

<?xml version="1.0" encoding="UTF-8" ?>
<tv generator-info-name="Rytec" generator-info-url="http://forums.openpli.org">
<channel id="RetEconomy.it">
    <display-name lang="it">Reteconomy</display-name>
  </channel>
  <channel id="RomaUno.it">
    <display-name lang="it">Roma Uno</display-name>
  </channel>
  <channel id="TRMh24.it">
    <display-name lang="it">TRM h24</display-name>
  </channel>
  <channel id="SuperTennis.it">
    <display-name lang="it">SuperTennis</display-name>
  </channel>
  <channel id="SkyAtlantic.it">
    <display-name lang="it">Sky Atlantic</display-name>
  </channel>
  <channel id="DMAX.it">
    <display-name lang="it">DMAX</display-name>
  </channel>
  <channel id="Sky24Meteo.it">
    <display-name lang="it">Sky TG 24 Meteo</display-name>
  </channel>
  <channel id="RomaTV.it">
    <display-name lang="it">Roma Tv</display-name>
  </channel>
  <channel id="TG24Norba.it">
    <display-name lang="it">TG Norba24</display-name>
  </channel>
  <channel id="RAI5.it">
    <display-name lang="it">Rai Cinque</display-name>
  </channel>
  <channel id="La7d.it">
    <display-name lang="it">La7d</display-name>
  </channel>
  <channel id="RTL102.5TV.it">
    <display-name lang="it">RTL 102.5 TV</display-name>
  </channel>
  <channel id="LaSposa.it">
    <display-name lang="it">La Sposa</display-name>
  </channel>
  <channel id="LaEffe.it">
    <display-name lang="it">LaEffe</display-name>
  </channel>
  <channel id="Focus.it">
    <display-name lang="it">Focus</display-name>
  </channel>

我不知道如何开始,所以每一个帮助都会非常感激。

0 个答案:

没有答案