Moving to XML
|
More about parsers [i] types
-
Event-based parsers
- You register handlers for parsing events you are
interested in
- The parser calls these handlers when it sees the
events
- Useful if you only want some of the information out
of the document
- Useful if the document might use more memory than you
have available
- Quite a lot of work to set up.
-
Document parsers
- Usually built on event-based parsers
-
Parse the whole document and provide you with a handle
on an internal representation of it
- Usually a DOM document object
- Useful if you want all the information out of the
document