They use two different software architectures - push vs pull.
XMLReader is a "pull parser". You are responsible for creating a large loop and calling the read () function to move the cursor forward. This software architecture is generally easier to understand intuitively.
XMLParser - , . , , start_element, end_element, character_data, start_namespace_decl .. xml_parse(), Expat XML-, .
push vs pull architecture, XMLReader, "pull" .