Main content:
XML Overview
Creation and Application of DTD and Schema
CSS and XSLT display XML
DOM
SAX
XML (extensible Markup Language) extensible Markup Language
XML is a markup language that you can use to create your own tags. Created by W3C
XML advantages
-Data Reuse
-Data and representation Separation
-Scalability
-Semantic information
-Custom tag to make the application more flexible
-Heterogeneous system integration
XML declaration:
<? XML version = "1.0" encoding = "UTF-8"?>
The statement is generally placed in the first line.
Components:
-Version documents comply with XML1.0 specifications
-Encoding document character encoding, which defaults to "UTF-8"
Handling instructions
The Processing Instruction is used to provide information to the application that processes the XML file. Then, the application interprets the instruction and processes it according to the information it provides, or pass it to the next application. XML declaration is a processing instruction.
All processing instructions should follow the following format:
<? Processing Instruction name Processing Instruction Information?>
EX: style sheet indication
<? XML-StyleSheet type = "type" href = "URl"?>
The type can be text/css or text/xsl.
// Indicates that the XML file is displayed with a CSS control.
Element
<Title> baidu </title>
Relationship between elements: child element/parent element ancestor/descendant
Element content type: Nested element/character data entity reference/CDate Section/Processing Instruction/comment
Root element
-XML documents must be contained in a single element. This single element is called the root element, which contains all text and all other elements in the document.
-The XML Parser can reject a document that does not contain a single root element, No matter what information the document may contain.
-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.
-The start marker of the root element should be placed before the start marker of all other elements.
-The end mark of the root element should be placed after the end mark of all other elements.
This article is from the "Enthusiasm" blog