Android XMLPullParser walks somewhat through an XML document

I am trying to use XMLPullParser to parse a large XML document for an Android application. Often I need to redraw a document from the very beginning.

  • How could I reset the parser? It seems inefficient to repeatedly call the getResources.getXML () method. What about calling setInput in the parser directly to reset? Is there any sample code.

  • If you need to iterate over an xml document multiple times, XMLPullParser is still recommended for performance issues.

Hi

+3
source share

Source: https://habr.com/ru/post/1784081/


All Articles