Web / Apache Axiom Interview questions
What is the difference between Axiom's LLOM and DOM implementations?
Both axiom-impl (LLOM) and axiom-dom implement the exact same Axiom SPI - OMElement, OMNode, and friends - so from a pure Axiom-API perspective, code written against the interfaces works unchanged regardless of which is on the classpath.
LLOM is a lightweight, custom linked-list tree structure designed with minimal overhead specifically for Axiom's deferred-building model - it has no obligation to satisfy the broader org.w3c.dom contract, so it can stay simple.
The DOM implementation builds the same logical structure but additionally implements org.w3c.dom.Node, Document, and related interfaces, so the resulting objects are simultaneously valid Axiom OM objects and valid DOM objects - useful when a downstream library (an XSLT engine, for instance) specifically requires genuine DOM types rather than Axiom's own interfaces.
That dual compliance comes at a modest cost: satisfying the full DOM contract requires more bookkeeping than LLOM's simpler structure needs, so the DOM implementation is generally somewhat heavier at runtime for the same document.
More Related questions...