vs html xml文件,Difference between HTML and XML

Key Difference:HTML is a markup language that is used to design web pages. It is written in predefined tag elements. Its primary purpose is to display data with focus on how the data looks. XML is a markup language whose primary purpose is to transport and store data. It is a language that can be used to develop new languages and define other languages. It does not have a predefined set of tags, and allows the developer to customize tags.

6dc102b5c28145c8f5acf03b694f3e20.png

HyperText Markup Language (HTML) is a well known mark up language used to develop web pages. It has been around for a long time and is commonly used in webpage design. XML or Extensible Markup Language defines a set of rules for encoding documents in a format that can be read by both, human and computer.

HTML is written using HTML elements, which consist of tags, primarily an opening tag and a closing tag. The data between these tags is usually the content. The main objective of HTML is to allow web browsers to interpret and display the content written between the tags. The tags are designed to describe the page content. HTML comes with predefined tags. These days, web pages are rarely only designed using HTML.

XML on the other hand, is a mark up language that is fairly new and was launched in 1996 as an adaptation of SGML (Standard Generalized Markup Language). The main purpose of XML is to be an independent hardware tool used to transport and store data with focus on what the data is. XML removes the constraint of sticking to pre-designed tags and gives developers the freedom to design new tags. It was developed to create standardized specifications for creating custom mark-up languages. XML-based languages include RSS, Atom and XHTML. It is neither a programming language not a presentation language. It is known as meta-language, or a language that can be used to define other languages.

xml.jpg

The XML is well-formed and has strict set of rules. Well-formed generally means that it satisfies a list of syntax rules provided in its specification. Containing only properly  encoded legal Unicode characters, no use of special syntax characters, element tags are correctly nested, etc are a few example of the syntax rules. It also includes a well-formed declaration that states the type of document it is and what processing rules should be applied.

In HTML, when a page created, the processor tries to make sense of the page and generates the content of the page. It does not require strict rules regarding the format of the page. It will generate the page best to its ability even with errors present. In XML, however, if certain rules are incorrect or the processor cannot comprehend something, the processor will generate an error code and terminate processing the file. It includes an error-handling mechanism referred to as ‘draconian’. Further specifications of both languages, including limitations are listed in the table below.

HTML

XML

Definition

Markup language for displaying web pages in a web browser. Designed to display data with focus on how the data looks

Markup language defines a set of rules for encoding documents that can be read by both humans and machines. Designed with focus on storing and transporting data.

Date when invented

1990

1996

Extended from

SGML

SGML

Type

Static

Dynamic

Usage

Display a web page

Transport data between the application and the database. To develop other mark up languages.

Processing/Rules

No strict rules. Browser will still generate data to the best of its ability

Strict rules must be followed or processor will terminate processing the file

Language type

Presentation

Neither presentation, nor programming

Tags

Predefined

Custom tags can be created by the author

White Space

Cannot preserve white space

Preserves white space

Limitations

Data does not know itself very well. Data cannot change in response to environment. Data cannot be easily maintained. Cannot store or call on variables. Lacks the capability to define new structures by defining relationships between classes. Tags are not useful for exchanging the document between applications.

Cannot be used as a subtype of a sql_variant instance.

Does not support casting or converting to either text or ntext. Does not support the following column and table constraints. XML provides its own encoding. Collations apply to string types only. Cannot be compared or sorted. Cannot be used in Distributed Partitioned Views. Not well supported by browsers.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
项目:– JavaScript 中的患者数据管理系统 患者数据管理系统是为医院开发的 node JS 项目。通过使用此系统,您可以轻松访问患者数据,它具有成本效益,可改善患者护理和数据安全性。不仅如此,它还减少了错误范围。在运行项目之前,您需要下载 node.js。 这个患者数据管理项目包含 javascript、node.js 和 CSS。我们必须让服务器监听端口 3000,并使用 JSON 在客户端和服务器之间交换数据。这个项目会不断询问您有关插件更新的信息,因此请保持互联网畅通。此系统允许您执行 crud 操作。在这里,您是系统的管理员。您还可以添加所需的员工人数。此外,您还可以更新患者记录。该系统功能齐全且功能齐全。 要运行此项目,您需要在计算机上安装NodeJS并使用现代浏览器,例如 Google Chrome、  Mozilla Firefox。ReactJS项目中的此项目可免费下载源代码。有关项目演示,请查看下面的图像滑块。 对于手动安装 1.将主项目文件夹解压到任意目录 2.从 cmd 设置项目目录的路径 3. 输入命令“npm install” 4.完成后输入命令“npm start” 5.现在,您将获得一个 localhost:portnumber,并转到该 URL 演示: 该项目为国外大神项目,可以作为毕业设计的项目,也可以作为大作业项目,不用担心代码重复,设计重复等,如果需要对项目进行修改,需要具备一定基础知识。 注意:如果装有360等杀毒软件,可能会出现误报的情况,源码本身并无病毒,使用源码时可以关闭360,或者添加信任。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值