SAX parser vs XMLPull parser

后端 未结 7 1274
长情又很酷
长情又很酷 2020-12-12 16:38

I understand the difference between how the SAX parser works vs the XMLPull parser. In fact there\'s a pretty good explanation here:

http://www.firstobject.com/xml-r

7条回答
  •  失恋的感觉
    2020-12-12 17:13

    I find that they both suck. (And I have a better solution to suggest)

    You should use the Simple annotation based XML library. I love it and use it for all of my projects. If you read through the tutorial then I think you will find that it will be able to do everything that you want and much faster and with less code. (Thus being less bug prone) Internally the library uses those parsers that you were asking about to do the heavy lifting.

    You can then read my blog post on including it in an Android project if you want. (It will work in every version of Android from atleast 1.5 up which means for everybody basically)

提交回复
热议问题