【问题标题】:Android PList problem with XMLwise: Object/String to List ViewXMLwise 的 Android PList 问题:对象/字符串到列表视图
【发布时间】:2011-05-31 09:22:45
【问题描述】:

我希望以前没有重复过,但我已经坚持了大约一个小时。

我正在使用 XMLwise 库来解析 Android 应用程序上的远程 PList。解析后的数据返回一个 Map。此 Map 中的第一项是我想要的数据,当我在 Map 条目上使用 getValue() 时,它会在记录时给我:

[
   {
     description=Teaching at the University of Kent has been ranked among the best in the UK by the Guardian 2012 University Guide., 
     url=http://www.kent.ac.uk/news/homepagestories/university-of-kent-teaching-ranked-among-best-in-uk/2011, 
     title=University of Kent teaching ranked among best in UK} .....
   },
 // etc
  ]

现在我对 Android bu 相当陌生,根据我从 JSON 表示法中了解到的情况,这对我来说就像一个 array 对象。 Java 告诉我这是一个对象,所以我似乎无法解析或循环遍历它。我想知道是否有人知道解析这个并将其附加到 ListView 的最佳方法是什么。

作为说明,我尝试了几种不同的解析 Plist 数据的方法,这个库是第一个有效的库,所以说实话,我真的对其他方法不感兴趣,只是希望找出如何解析我收到的数据。

非常感谢!

【问题讨论】:

    标签: android plist


    【解决方案1】:

    根据我对the source code 的阅读,您需要将Object 转换为ArrayList<Object> 以对其进行迭代。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多