什么是Android中处理XML的最佳方式 [英] What is the best way to handling XML in Android

查看:189
本文介绍了什么是Android中处理XML的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android设备慢得多,并大大降低内存比较PC /服务器,那么什么是Android中处理XML的最佳方式?我有一组解析需要非常复杂的XML。无论SAX或DOM会造成太大code。任何人有好的建议吗?我想使它清洁和快速

Android device is much slower and have much lower memory compare to PC/server, So what is the best way to handling XML in Android? And I have a set of very complex xml needed to parse. both SAX or DOM will cause too much code. Anybody have good suggestion? I want to make it clean and fast

推荐答案

解析器在应用程序中使用的那种取决于您的要求。您可以尝试 XMLPullParser 太。你可以看到所有三个这里解析器的性能。

The Kind of parser you use in your application depends on your requirement. You can try XMLPullParser too. You can see the performance of all the three parsers here..

http://www.developer.com/ws/article.php/10927_3824221_2/Android-XML-Parser-Performance.htm

有提供一些第三方的XML解析器太...我就是用这个解析器我previous应用之一,它是相当快的。它有它的XPath实现。

There are a few third party XML parsers available too... I was using this parser for one of my previous application and it was fairly fast. It has Xpath implementation in it.

http://vtd-xml.sourceforge.net/

这篇关于什么是Android中处理XML的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆