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