Why do they exist at the same time?
What is Dom?
What is sax?
When to use dom
When to use SAX
Conclusion
Why do they exist at the same time?
--------------------------------------------------------------------------------
SAX (Simple API for XML)
Java parses XML in two ways: Dom and sax. Although Dom is W3C standard and provides a standard parsing method, its parsing efficiency has been unsatisfactory because when using Dom to parse XML, the parser reads the entire document and constructs a
Why do they exist at the same time?
--------------------------------------------------------------------------------
SAX (Simple API for XML) and Dom (Document Object Model) are designed to allow programmers to access their information without
Xml| Programming Sax Concept
Sax is the abbreviation of simple API for XML, it is not the standard that is put forward by the official of the consortium, it can be said as the "folk" fact standard. In fact, it is a community-nature discussion
-------------------------------------Sax Parsing XML----------------------------------"Sax definitionSax is a fast parsing and memory-intensive XML parser, ideal for mobile devices such as AndroidThe Sax full name is simple API for Xml, which refers
Source: IBM Tutorial Download
SAX is what.
The standard used to read and manipulate XML files is the Document Object model (Doc object model,dom). Unfortunately, the DOM method involves reading the entire file and storing
Sax features (SAX is short for SimpleAPIforXML) 1. high resolution efficiency, less memory occupied 2. resolution can be stopped at any time. 3. the entire document cannot be loaded into memory. 4. the xml file cannot be written to xml5.SAX for
Xml| programming the current SAX API has two versions. We use the second edition (see Resources) to do the example. The class and method names in the second edition are not the same as the first version, but the structure of the code is the same.
One, Dom parsing xmlWe first look at the DOM (Document Object Model) parsing XML, through the DOM parsing XML in the development of the Java EE is very common, it is the entire XML as a tree-like structure, when parsing, the entire XML file will be
Parse XML using SAX
SAX is an xml parser with high resolution speed and low memory usage. It is suitable for Android and other mobile devices. An event-driven file is used to parse an XML file. That is to say, it does not need to parse a
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.