[Open Source framework recommendation] VTD-XML: the world's fastest XML Processing Framework

Source: Internet
Author: User

The DOM method directly loads all XML files to the memory and creates a DOM tree. Features: readable and writable, supports XPath, but it is very slow and occupies 10 multiples of XML memory, cannot process large files.
The sax method is the event notification mechanism, which processes xml a Little Bit. Every time a node is analyzed, the processing logic implemented by the user is called. Features: very fast, almost no memory occupied, only read, you can only read the specified content once. You cannot read the specified content or read the content repeatedly. APIs are more difficult to use than Dom.

VTD-XML is compatible with the advantages of these two XML processing technologies, first scan the XML file in binary mode, a binary index for all nodes, this requires only 1-times the amount of memory in XML. Then, you only need to find the offset from the index for the read operation. VTD-XML's XPath implementation is also based on this principle, so very fast.

Relatively sax: it can be modified to read and read at random or repeatedly,
DOM: memory usage is more than twice that of XML, and Dom is usually 10 times. It supports high-speed XPath expressions.

The processing efficiency of VTD-XML is several times that of DOM: http://vtd-xml.sourceforge.net/benchmark1.html

Address: http://vtd-xml.sourceforge.net/
Principle Introduction: http://vtd-xml.sourceforge.net/DevGuide/0.html

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.