If your document is large, but you only need part of the document, then the XML pull parser might be a more efficient way to go.
如果您的文档比较大,但您只需要文档的一部分,则XML Pull解析器可能是更为有效的方法。
You can process large sets of data more efficiently with an XML pull parser rather than load the entire data structure all at once in memory as you need to do with JSON or serialize PHP.
您可以使用一个XML pull parser更有效地处理大型数据集,而非一次性地将整个数据结构加载到内存中,就像使用JSON或序列化php那样。
The XML Pull parser API is similar to the cursor-based API provided by StAX; the parser state can be examined for information about the last parsed event, then advanced to the next one, and so on.
XML Pull Parser API类似于StAX所提供的基于指针的API,可以通过分析解析器的状态获得上一个解析事件的信息,然后移动到下一个,依此类推。
应用推荐