An overview of XML parsing techniques

Source: Internet
Author: User
Tags object model xml parser

It Programmer development Essentials-all kinds of resources download list, history of the most IT resources, personal collection summary. an overview of XML parsing techniques

There are two ways to parse 1.XML: Dom and sax (1) DOM: (The Document Object model, which is the file-based one) is the recommended way for the organization to process XML. (Easy to document CRUD operation, but memory consumption is relatively large)
(2) Sax: (Simple API for XML) is not an official standard, but it is the de facto standard of the XML community, which is supported by almost all XML parsers. (Low memory consumption, but not suitable for document additions and deletions)
2.XML Parser
Crimson, Xerces, Aelfred2
3.XML Parsing Development Kit

Jaxp (Sun), Jdom, dom4j


JAXP Development Kit
The 1.JAXP Development Kit is part of the J2SE, which consists of Javax.xml, Org.w3c.dom, org.xml.sax packages and their child packages
2. In the Javax.xml.parsers package, several factory classes are defined, and the programmer calls these factory classes to get the parser object for the DOM or SAX parsing the XML document.

dom4j Parsing XML documents

1.DOM4J is a simple, flexible library of open source code. DOM4J was developed by the people who developed jdom early and then independently. Unlike Jdom, DOM4J uses interfaces and abstract base classes, and although the DOM4J API is relatively complex, it provides greater flexibility than jdom.
2.DOM4J is a very good Java XML API with excellent performance, powerful features, and easy to use features. Many of the dom4j used by software now, such as Hibernate, including Sun's own JAXM, also use dom4j.




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.