XML Overview 1

Source: Internet
Author: User

 

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

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.