Java Object-Oriented programming 20th Chapter XML Technical Analysis

Source: Internet
Author: User
Tags cdata

1, xml:extended Markup Language Extensible Markup Language, using labels and sub-tags to describe the data.

2. Declaration <?xml version= "1.0"?> version number

Notes <!---->

No content between empty elements:<x/> tags

3. Each XML document must have only one root element; The root element is an element that completely includes all the other elements in the document; All elements must be defined in the root element.

4, the entity in the XML is a storage unit, an entity can contain strings, files, database records, and some other data. Predefined symbols: "<" "" ">", using predefined entities in an XML document instead, P527 on the book.

5. CDATA is text that is not parsed by the parser. tags within the text are not treated as tokens and entities are not expanded. Syntax: <!  [cdata[..... ]]>

6. The XML document must be well-formed (well-formed): satisfies the basic syntax rules of XML. If the XML document is not well-formed, it cannot be correctly identified and parsed by the application and the browser.

7. Syntax Specification:

A) must have an XML declaration statement; <?xml version= "1.0"?>

b) must have and have only one root element;

c) marked case sensitivity;

d) attribute values are in double or single quotation marks;

e) marked in pairs;

f) null mark off

g) elements are properly nested

8, valid XML in addition to satisfy the XML specification, but also to meet the corresponding DTD and schema definition of the element rules; Valid XML must be well-formed, but well-formed XML is not necessarily valid.

9. DOM parsing: API based on tree structure; the entire XML document must be parsed and stored in memory; The client application can access the objects randomly; large documents can cause memory tension.

10. Sax provides an event-driven model for parsing an XML document, using a callback mechanism to notify an application of an event, a feature that does not have to load the entire file into memory, consumes less memory, does not have random access to the document, and the sax is read-only;

Java Object-Oriented programming 20th Chapter XML Technical Analysis

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.