XML 是一种编程语言吗? [英] Is XML a programming language?

查看:167
本文介绍了XML 是一种编程语言吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常听到人们在列出他们知道的编程语言时会提到 XML.

I often hear when people list the programming languages they know, they mention XML.

但它甚至是一种编程语言吗?

But is it even a programming language?

我将 XML 视为类似于 JSON 的数据集".

I consider XML as a "dataset" similar to JSON.

此外,我看到一些公司需要 XML 知识,但是……有什么需要了解的?

Moreover, I have seen companies requiring knowledge of XML but... what is much to know there?

推荐答案

一种编程语言?

首先,XML 是一种表示数据的格式.它最初是为这些数据设计的,本质上是文本文档或消息,但没有什么可以阻止您表示您希望的任何数据,包括程序.我至少想到了三个用 XML 表示的程序示例:

A programming language?

First, XML is a format to represent data. It has originally be designed for this data to be essentially text documents or messages, but nothing prevents you from representing any data you wish, including programs. There at least three big examples of programs expressed in XML that come to mind:

  1. XSLT 是一种 图灵完备 语言,其唯一的标准格式使用 XML 格式,其基本目的是数据转换.
  2. ANT 是一个任务管理器,主要用于编译管理,其任务用 XML 描述.
  3. GCC-XML 是 GCC 可用于输出其源代码解析结果的格式.
  1. XSLT is a Turing-complete language whose only standard format is in XML, whose essential purpose is data transformations.
  2. ANT is a task manager, used mostly for compilation management, whose tasks are described in XML.
  3. GCC-XML is a format that GCC can use to output the result of its parsing of a source code.

更深奥的一点是,您可以引用 o:XML,一种成熟的 XML 编程语言.

On a more esoteric note, you could cite o:XML, a full-fledged XML programming language.

因此,由于任何 XMLDTD 或 Schema 在语义上扩展了 XML 本身,您可以从技术上说 XML 本身,通过它的一些扩展, 一种编程语言.

So as any XML, DTD or Schema semantically extends XML itself, you could technically argue that XML itself, through some of its extensions, is a programming language.

其次,XML 是一个庞大的规范星云,大多数人只触及皮毛.大多数人甚至无法想象 XML 本身的极端情况,更不用说 XML 命名空间、XML 架构、XML 信息集、XQuery、XPath、XSLT、XSL-FO、XML 规范化、XML 签名、高效的 XML 交换、XML 链接中的内容等

Second, XML is a vast nebula of specifications, and most people only barely scratch the surface. Most people don't even imagine the corner cases in XML itself, let alone what's in XML Namespaces, XML Schema, XML Information Set, XQuery, XPath, XSLT, XSL-FO, XML Canonicalization, XML Signature, Efficient XML Interchange, XML Linking, etc.

所以,是的,我想说有很多东西要知道......

So, yeah, I'd say there's plenty to know...

这篇关于XML 是一种编程语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆