XML High-Speed Primer summary

Source: Internet
Author: User

XML has been learning for some time. Always feel the knowledge is more trivial, did not go to a good summary. In fact, the more trivial the knowledge, the more we need to be good .

Take a look. String up the knowledge. Strive to become less trivial. Here is a picture of my XML drawing.


The following is a brief introduction to XML.

XML IntroductionXML refers to Extensible Markup Language (extensible Markup Language). is a markup language, very similar to HTML.

XML is designed to

Data transmission. Rather than displaying the data. XML tags are not defined in advance. You need to define your own labels. XML is designed to have a narrative of self-description.

XML is a consortium of

Recommended standards.


the main differences between XML and HTML

XML is not an alternative to HTML.

XML and HTML are designed for different purposes:

XML is designed to transmit and store data. The focus is on the content of the data.

HTML is designed to display data with the focus on the appearance of the data.

HTML is designed to display information, while XML is designed to transmit information.

Grammar(1) All XML elements must have a close tag
(2) XML tags are sensitive to uppercase and lowercase
(3) XML must be nested correctly
(4) An XML document must have an element that is the parent element of all other elements. This element is called the root element.

DTD and Schemaschema is the definition of XML document structure and descriptive narrative, its basic role is to constrain the XML file, and verify the validity of the XML file. The role of DTDs

is a legitimate building block that defines XML, which uses a series of legitimate elements to define the structure of a document. The difference between them has the following points:

(1) The schema itself is an XML document, and the DTD definition does not have anything to do with XML, which has many advantages in understanding and applying the schema.

(2) The structure of the DTD document is "tiled", and it is very difficult to grasp the nesting relationship between the elements, assuming the complex XML document is defined; Schema document

Structurally strong. The nesting relationship between the elements is straightforward.

(3) The DTD can only specify that the element contains text and cannot define the detail type of the element text, such as character type, integer type, date type, own definition type, etc.

The schema is more powerful than a DTD in this respect.
(4) schema supports the description of the sequence of element nodes, and the DTD does not provide a descriptive narrative of the disordered situation. To define all the circumstances of the unordered mandatory exhaustive arrangement.

Schemas can use Xs:all to represent unordered situations.

(5) Support for namespaces.

DTDs cannot take advantage of XML namespaces, and schemas are well-suited to namespaces. Furthermore, the schema provides a

Include and import two methods for referencing namespaces.

Schema is an alternative to DTDs.


Personal finishing touchesThe three markup languages in the above diagram are developed in the following order: HTML (Hypertext Markup Language)--xhtml (Extensible Hypertext Markup Language)--

XML (Extensible Markup Language). When learning knowledge, the first thing to do is to clear the big background. Understand the relationship between languages. To clarify the idea, learn

Learning is organized.


XML High-Speed Primer summary

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.