bits and bytes but also tries to understand the content. The streaming parser doesn’t care
how big the document (or the amount of water) is, it just takes out what it needs from the
stream. Streaming parsers are also referred to as event-based parsers since they react to
certain events in the data stream. DOM parsers are referred to as tree-based parsers since
they build a full representation of the document in the tree-like structure. In an HTML tree
the html element would be the root of the tree, and the body tag a fork in that tree.