开发者

Android XMLPullParser multiple passes through XML document

开发者 https://www.devze.com 2023-02-02 19:51 出处:网络
I\'m trying to use XMLPullParser to parse a large XML document for an Android application.Often I need to re-traverse the document from the beginning.

I'm trying to use XMLPullParser to parse a large XML document for an Android application. Often I need to re-traverse the document from the beginning.

  1. How would I reset the parser? It seems inefficient to call getResources.getXML() repeatedly. What about calling calling setInp开发者_运维技巧ut on the parser directly to reset? Is there a code example.

  2. If the xml document needs to be traversed multiple times, is XMLPullParser still recommended for performance concerns.

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消