Dom parsing:
Read all the memory at once, arbitrarily store changes, read any part, the number of unlimited, different from development, the system for developers to automatically build the DOM tree, the XML object model is automatically provided by the system. Disadvantage: It needs to be read into memory one time, limited by file size, memory consumption.
Sax parsing:
Advantage: Sequential reads into memory, does not load at once, is not restricted by file, due to partial read. Disadvantage: The file can only be read sequentially parsing, not random access, can not be modified, development complex, users need to define their own time processing. But development is more flexible, and you can use sax to build your own XML object model.
JDOM: The benefits of comprehensive DOM parsing and sax parsing.
DOM4J: Powerful, Hibernate and spring all use DOM4J for XML parsing operations. Mainstream.
JavaScript Operation Dom: The main application is done at the page level.
Summary: The data is now transmitted using JSON because it is easy to transport, easy to parse, and lighter, similar to array objects. More flexible! XML is primarily used for configuration files, and is not frequently modified at rest.
Comparison of "web base" XML parsing tools