pullparsing
Pull parsing is a technique for reading structured data streams, notably XML, by actively requesting the next event from a parser. In pull parsing, the application drives the parsing process by calling a method such as next() or nextToken() and inspecting the returned event (for example START_TAG, END_TAG, TEXT). This contrasts with push parsers like SAX, which deliver events to the application via callbacks. Pull parsers are typically streaming and forward-only, enabling memory-efficient processing of large documents and enabling fine-grained control over how and when data is consumed.
Common implementations include Java's StAX (Streaming API for XML) with XMLStreamReader, and Android's XmlPullParser, as well
Benefits and tradeoffs: It provides deterministic flow, easier state management than SAX callbacks, and good for
Use cases include parsing large XML files, streaming data from networks, incremental processing. It is not ideal