StAX Streaming Parser and DOM Tree Builder Interoperability: Memory Footprint at Integration Boundary
StAX provides a low‑memory, event‑driven API while DOM builds a complete in‑memory tree, creating a mismatch when the two are combined at an integration point. Goal: design a pattern that allows StAX to supply parsed fragments to a DOM builder without causing unbounded memory growth, especially for documents exceeding 100 MB. Uncertainty remains about whethe