Dahua XML (2) Comparison of XML and HTML 1

Source: Internet
Author: User
Tags format comparison expression reset
xml| comparison

Two. Comparison of XML and HTML let's look at an example:

There is a student's information: including the student's number, name, gender, age.

We use three expressions to represent this student's message.

The student's information data are the same: 001, John, Male, 20

We first use HTML to show 3 different representations, but the data we use for this student is the same.

The first form of expression:

The effect displayed:

001, John, Male, 20

HTML Source code:

<body>

001, John, Male, 20

</body>

The second expression: the effect of the display:

001

name

John

sex

male

age

20



HTML Source code:

<body>

<table width= "border=" 0 "cellspacing=" 0 "cellpadding=" 0 "bgcolor=" #000000 ">

<tr>

<td>

<table width= "border=" 0 "cellspacing=" 1 "cellpadding=" 0 "bgcolor=" 1 ">

<tr>

<td> number </td>

<td>001</td>

</tr>

<tr>

<td> name </td>

<td> John </td>

</tr>

<tr>

<td> Sex </td>

<td> male </td>

</tr>

<tr>

<td> Age </td>

<td>20 </td>

</tr>

</table>

</td>

</tr>

</table>

</body>

The third expression: the effect of the display:

Student Information

Number:

Gender:

Name:

Age:



HTML source code:

<body>

<p> Student Information </p>

<p> No:

< Input type= "text" name= "TextField" value= "001"

</p> Gender:

<input type= "text" Name= " Textfield2 "value=" "

<p> Name:

<input type=" text "name=" textfield3 "value=" John "

</p>

<p> Age:

<input type= "text" name= "Textfield4" value= ""

</p

<p>

<input type= "Submit" name= "submit" value= "Submit" >

<input type= " Submit "Name=" Submit2 "value=" Reset ">

</p>

</body>

Look at the above example, what are the comrades ' thoughts? Does

feel that HTML is getting fatter and harder to find data through source code? The

HTML itself has many drawbacks, such as content and page layout, presentation, and excessive bloat. Information stored in the database, after the interpretation and conversion of cgi,asp to HTML format, the original format of the information has become unrecognizable. The gradual popularity of E-commerce, the shortcomings of the HTML itself has hindered his development.



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.