什么是XML(可扩展标记语言)?

Extensible Markup Language or XML is a popular markup language that is used to represent different types of information in a structured manner. XML is created by the World Wide Web or WWW consortium in order to create open, human-readable and machine-readable data format.

Extensible Markup LanguageXML是一种流行的标记语言,用于以结构化方式表示不同类型的信息。 XML由万维网或WWW联盟创建,以创建开放的,人类可读的和机器可读的数据格式。

什么是XML(可扩展标记语言)? (What Is XML (eXtensible Markup Language)?)

XML design goals are simplicity, generality, openness, useability, human-readable easily extensibility. XML is similar to the HTML which is a markup language too used to create web pages. XML is similar to HTML were used to define and store different types of information as structure data. XML documents and data created with Unicode characters which makes it compatible with different languages and alphabets. Even there is a binary XML version it is not used widely which is against the XML openness and human readability.

XML设计目标是简单性,通用性,开放性,可用性,易于阅读的人类可扩展性。 XML与HTML相似,HTML也是一种用于创建网页的标记语言。 XML与HTML相似,被用来定义和存储不同类型的信息作为结构数据。 使用Unicode字符创建的XML文档和数据使其与不同的语言和字母兼容。 即使存在二进制XML版本,它也不被广泛使用,这不利于XML的开放性和人类可读性。

XML files uses the .xml file extension. For MIME or internet media type application/xml or text/xml can be used as a media type identifier. The magic number of the XML document which means the first characters or data of the XML document is <?xml . XML is named as a markup language like HTML, XHTML, SGML which is different than JavaScript or CSS. XML is inherited by different markup languages and standards like XHTML, RSS, Atom, KML.

XML文件使用.xml文件扩展名。 对于MIME或Internet媒体类型,可以将application/xmltext/xml用作媒体类型标识符。 XML文档的幻数,表示XML文档的第一个字符或数据是<?xml 。 XML被命名为一种标记语言,例如HTML,XHTML,SGML,与JavaScript或CSS不同。 XML由不同的标记语言和标准(例如XHTML,RSS,Atom,KML)继承。

XML历史 (XML History)

XML is an WWW standard which is derived from the SGML. Even XML history is about 25 years there is very little change and intermediate version because of its extensibility which eliminated updates.

XML是从SGML派生的WWW标准。 甚至XML历史大约25年,由于中间件的可扩展性消除了更新,因此几乎没有更改和中间版本。

XML standardization work started in 1996 where Tim Bray, Jean Paoli, M. Sperberg, Eve Maler, François Yergeau, John Cowan were first editors and standard creators. But this working group is supported about 150 members of Interest group.

XML标准化工作始于1996年,当时Tim Bray,Jean Paoli,M。Sperberg,Eve Maler,FrançoisYergeau和John Cowan是第一批编辑和标准创建者。 但是这个工作小组得到了利益小组约150名成员的支持。

LEARN MORE  HTML Div Tag Usage Tutorial with Examples
了解更多有关HTML Div标签用法的示例教程

XML 1.0 is created and published on February 1998 and became a W3C recommendation. This is also the first and last majr version of the XML.

XML 1.0于1998年2月创建和发布,并成为W3C建议。 这也是XML的第一个也是最后一个主要版本。

XML 1.1 was published in February 2004 and it is an update to 1.0 version. XML 1.1 contains some little updates for different cases. Eve a newer version XML 1.1 is not adopted and implemented widely.

XML 1.1于2004年2月发布,它是对1.0版本的更新。 XML 1.1包含针对不同情况的一些小更新。 Eve的较新版本XML 1.1没有被广泛采用和实现。

XML的优势 (XML Advantages)

There are some advanteges about the XML for data storage, transmission or exchange. Below we will list XML advantegs.

关于用于数据存储,传输或交换的XML有一些优势。 下面我们将列出XML优点。

Open : XML is an open data format where it can beeasily implemented in different applications, programming languages, platforms and operating systems without a fee.

Open :XML是一种开放数据格式,可以轻松地在不同的应用程序,编程语言,平台和操作系统中免费实现。

Extensible : XML is extensible where different types of data and data structures can be created easily without any restriction.

Extensible :XML是可扩展的,可以轻松地创建各种类型的数据和数据结构而没有任何限制。

Easy To Read : XML is a text based data format where it can be read by a human and there is not need to make format conversion.

Easy To Read :XML是一种基于文本的数据格式,可以由人类读取,并且不需要进行格式转换。

Cross-Platform : As a open and easy to read markup language XML is used in different and wide range of platforms easily. For example an XML document created in Android can be easily processed in Windows 98 operating system.

Cross-Platform :作为一种开放且易于阅读的标记语言,XML可以轻松地在各种不同的平台中使用。 例如,可以在Windows 98操作系统中轻松处理在Android中创建的XML文档。

Support: With its popularity there are a lot of XML libraries and implementations ready to use creation, read and process XML data.

Support :随着它的普及,有许多XML库和实现可以使用来创建,读取和处理XML数据。

XML的缺点 (XML Disadvantages)

Even XML is widely used for personal and enterprise data storage and transmission it has some disadvantages.

甚至XML也被广泛用于个人和企业数据的存储和传输,它也有一些缺点。

Verbosity: XML is a verbose markup language where a lot of tags, words should be used in order to define different types of data properly. For example in order to store a name and surname a lot of characters should be typed.

Verbosity :XML是一种冗长的标记语言,其中使用许多标签和单词,以便正确定义不同类型的数据。 例如,为了存储名称和姓氏,应键入很多字符。

LEARN MORE  What Is Webpage?
了解更多什么是网页?

Complexity: XML is structured and extensible but this makes the XML complex. Especially extensibility makes is very complex because everything should be precisely defined in an XML document.

Complexity :XML是结构化且可扩展的,但这会使XML变得复杂。 特别是可扩展性非常复杂,因为所有内容都应在XML文档中精确定义。

Performance: XML complexity also leads to higher performance or resource requirements in order to create or process an XML document. As a structured data format, the validity of the XML document should be checked properly which will take more time.

Performance :XML复杂性还导致更高的性能或资源要求,以创建或处理XML文档。 作为结构化的数据格式,应正确检查XML文档的有效性,这将花费更多时间。

Self Describing: Another advantage and dis-advantage are self-describing. Most of the data types are describe and defined explicitly in XML and uses a ground-up methodology to define document structure

Self Describing :另一个优点和缺点是自我描述。 大多数数据类型都是用XML显式描述和定义的,并使用一种自上而下的方法来定义文档结构

XML样本(XML Sample)

Below we will create an XML document. XML document is a single file with an .xml extension that contains XML content. The XML document below contains information about multiple web sites, URLs, descriptions in a structured way.

在下面,我们将创建一个XML文档。 XML文档是带有.xml扩展名的单个文件,其中包含XML内容。 下面的XML文档以结构化的方式包含有关多个网站,URL,描述的信息。

<?xml version="1.0" encoding="UTF-8"?>
<web>
<site>
    <name>Poftut</name>
    <url>https://www.poftut.com</url>
    <description>
      Tutorials for Linux, Network, Security, Programming
   </description>
</site>
<site>
    <name>Kaleinfo</name>
    <url>https://www.kaleinfo.com</url>
    <description>
      Kaleinfo Inc.
   </description>
</site>
</web>

XML术语 (XML Terminology)

XML has a wide terminology where we will list some of the most popular and important of them.

XML具有广泛的术语,在此我们将列出其中一些最受欢迎和最重要的术语。

Character is the most basic part of the XML which is used to create other structures. A character is a Unicode character.

Character是XML的最基本部分,用于创建其他结构。 字符是Unicode字符。

Processor or Application is an application that will read an XML document and analyze and validates it. The processor also named XML parser to get data and its type.

Processor or Application程序是将读取XML文档并对其进行分析和验证的应用程序。 该处理器还命名XML解析器以获取数据及其类型。

Markup or Tag is used to define, attribute, start, end … data. Markup and tag are stored between < and >.

MarkupTag用于定义,属性,开始,结束……数据。 标记和标签存储在<和>之间。

Data is the content which wanted to be stored or transferred. Data is stored inside related markup or tag. Data became meaningful with its surrounding markup or tag.

Data是要存储或传输的内容。 数据存储在相关的标记或标签中。 数据及其周围的标记或标签变得有意义。

Attribute is used to set some information about the markup or tag. It will also reflect the stored data representation.

Attribute用于设置有关标记或标签的一些信息。 它还将反映存储的数据表示。

LEARN MORE  Nmap Output
了解更多Nmap输出

XML declaration is used to declare the given document as an XML document which is <?xml version="1.0" encoding="UTF-8"?> .

XML declaration用于将给定文档声明为<?xml version="1.0" encoding="UTF-8"?>的XML文档。

Comment is used to put some comments, explanation which will not be processed or used as information or data source.

Comment用于放置一些注释,解释,这些注释将不会被处理或用作信息或数据源。

翻译自: https://www.poftut.com/what-is-xml-extensible-markup-language/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值