Comparison in XML

Source: Internet
Author: User

After watching the four sets of XML videos in a vague manner, nothing is left in the head. However, I would like to summarize the comparison between XML and HTML and schema and DTD.

Comparison Between XML and HTML:

1. xml and HTML are both Markup languages. XML can be extended, while HTML cannot be extended.
2. xml Allows defining (unlimited) tags, and allows nested information structures, while HTML is a fixed tag.
3. XML provides a common method for directly "processing" Web data, while HTML is only a common method for "Displaying" Web data. XML focuses on the "content" of the web page, while HTML focuses on the "display format" of the page ".
4. xml enables machines to talk (automatically process information). html facilitates communication between people (only the initial stage of the network ).
HTML is still the easiest way to quickly publish data on the web, most of which are short-term data, such as meeting agenda or advertising brochures. If the data will be used for a long time and requires more structures, you are still willing to use XML.

Comparison between Schema and DTD:

1. Both schema and DTD are used to define the usage specification of XML tags in various files .. Schema is a standard XML file, while DTD uses its own special syntax. Therefore, you only need to know the XML syntax rules to write the schema, and you do not need to learn other syntax rules. it can be interpreted using the same processor.

2. schema uses the namespace to associate special nodes in the file with the schema description. an XML file can have multiple corresponding schemas, a dtd can only have one corresponding DTD file.
3. the schema content model is open and can be expanded at will, while the DTD cannot interpret the expanded content .. The DTD can only define the file type as a string, while the schema can define the file type as an integer, floating point, String, Boolean value, or other data types without redefinition.
4. The obvious advantage of Schema over DTD is that the schema file itself is also an XML file, rather than using a special format like DTD. This facilitates users and designers because they can use the same tools to process and develop, schema and other XML data without using specialized development or processing tools.

The last schema replaces DTD, while XML cannot replace HTML.

Comparison in XML

Related Article

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.