SAX (Simple API for XML) is event-based and streams through the document without loading it entirely into memory. DOM builds a complete tree structure in memory, making it inefficient for huge files. SAX is optimal when you need to search or extract specific data from large XML files.