java - What is 'Push Approach' and 'Pull Approach' to parsing? -
under push parsing approach, push parser generates synchronous events document parsed, , these events can processed application using callback handler model
this text given in book pro xml development java sax 2.0.
as stax, book says:
under pull approach, events pulled xml document under control of application using parser.
i want ask, meaning of highlighted text ? answer befitting beginner appreciated :)
basically, push when parser says handler, "i have foo, it." pull when handler says parser, "give me next foo."
push:
if (mychar == '(') handler.handleopenparen(); // push open paren handler
pull:
token token = parser.next(); // pull next token parser
Comments
Post a Comment