The XML DOM is a hierarchical representation of an XML document. For large documents the DOM can be problematic since the entire tree must be constructed in memory. For those situations SAX may be preferred or necessary.