Among all the above mapping techniques, JAVA mappings improves the performance and are
preferred as they gets executed on J2EE engine directly.
JAVA mapping can be done in two ways: 1. DOM Parsing 2. SAX Parsing Differences between SAX and DOM parser at a glance SAX DOM 1. Parses node by node 2. Doesnt store the XML in memory 3. We cant insert or delete a node 4. Top to bottom traversing 1. Stores the entire XML document into memory before processing 2. Occupies more memory 3. We can insert or delete nodes 4. Traverse in any direction.