Comparison of "web base" XML parsing tools

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.