dongwen5870 2012-07-11 13:45
浏览 69
已采纳

从Android应用访问Wordpress数据?

Scenario: Making an Android app using data from a website built with Wordpress. The way it's used will be much different than the website itself, but uses most of the same data, so I need more than just a simple WebView. The site uses Wordpress to it's fullest CMS capabilities, it's much more than just a traditional Wordpress blog.

I know WordPress has been building a fairly robust XML-RPC API to get posts, pages, custom post types, categories, tags, custom taxonomies, media, comments, options, etc ( wordpress xmlrpc api codex here: http://codex.wordpress.org/XML-RPC_WordPress_API ).

I'm a web developer, but I know my way around Java. Unfortunately, I haven't developed much on Android besides following some tutorials and playing around with a few things.

I looked at the official Wordpress for Android app (repository here: https://android.trac.wordpress.org/browser#trunk/src/org/xmlrpc/android ) to see how they gather all the appropriate data, but the client they've developed is far more than I need, and I can't exactly pop it in like a .jar and go with it.

So I suppose my question is this: Has anyone done this before? What kind of client did you use, a prepackaged one, or a custom one? I know similar questions have been asked before, but I also know a lot of the improvements to the WP XML-RPC API were added in the latest version of Wordpress (3.4), so there's not a whole lot of info out there, but any direction would be much appreciated.

  • 写回答

1条回答 默认 最新

  • duanph1978 2012-07-12 11:36
    关注

    I was also having the same problem while trying to make an app for a website built on PHP/mySQL. I think you can check XML Parser

    How to parse XML using the SAX parser

    http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/

    However for my website I am trying to use Jsoup to parse the html directly and populate listview.

    extract text from HTML segment using standard java

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行