October 2002
Intermediate to advanced
400 pages
9h 40m
English
During the last chapter, we discussed event-based XML parsers. An event-based XML parser defines subroutines that are triggered whenever the XML parser encounters a particular construct.This chapter discusses an alternative to event-based XML parsing called tree-based XML parsing.
A tree-based XML parser takes a different approach to the task of parsing an XML document. Contrary to the passive event-based approach where the application defines event handlers and waits for the handler to be triggered, the tree-based approach to XML parsing is more active. In the tree-based approach, the entire XML document is parsed and the entire document is stored in memory in a structure similar to a tree. To access a particular ...