本文介绍了寻找一个Android XML教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个完整的牛逼到Java和Android编程,我用这本书教你在24小时内的Andr​​oid程序,到目前为止,我已经能够让我工作使用的应用程序。

I'm a complete newby to Java and Android programming, I'm using the book Teach yourself Android programming in 24 hours and so far I've been able to get the application I'm working on to work.

我现在需要做的是有我的应用程序,连接到我的Web服务器运行创建一个XML文件,一个PHP脚本,然后使用该文件作为一个菜单。我在寻找一个好的简明教程下载XML文件,然后分析它们。

What I need to do now is have my app, connect to my web server run a php script that creates an xml file and then use that file as a menu. I'm looking for a good concise tutorial on downloading xml files and then parsing them.

我GOOGLE了,直到我不能再谷歌,我希望有人能指出我在正确的方向。

I've googled until I can't google anymore and am hoping someone can point me in the right direction.

感谢您

推荐答案

在我看来,以应对在Android XML的最佳方法是使用的。它是一个基于注解框架,所以你不必写用大量的样板code的一片狼藉SAX解析器,而是你刚才正确标注类,使他们可以很容易地转换和XML。

In my opinion the best way to deal with XML on Android is to use the Simple XML library. It is an annotation based framework so you do not have to write a messy SAX parser with plenty of boilerplate code, instead you just correctly annotate classes so that they can easily be converted to and from XML.

我写了一篇博客文章上它自己,如果你希望有一个上下载的XML文件,然后分析他们一个很好的简明教程。随后的。所有你必须​​做一些额外的开拓作为输入流到您的网站的连接,并给它的简单的读(类,InputStream的)功能。

I wrote a blog post on it myself if you want a "a good concise tutorial on downloading xml files and then parsing them." then you can look at it here. All you have to do extra is open up the connection to your website as an input stream and give it to the Simple read(Class, InputStream) function.

这篇关于寻找一个Android XML教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 21:34