文書の構造などに関する指定を記述する, “<” と “>” に囲まれるタグを, 利用者が目的に応じて定義して使うことができる言語はどれか。
平成22年度 秋期 ITパスポート試験 問56
This question's explanation and your answers so far.
問 56
Incorrectア
COBOL is a procedural programming language created for business data processing (accounting, payroll calculation, and so on), not a markup language for describing document structure. It does not even have the concept of a tag.
Incorrectイ
HTML does match the question as far as using tags enclosed in “<” and “>”, but it is a language intended for displaying web pages, and the tags it can use (<p>, <table>, <a>, and so on) are fixed in advance by the specification. Users cannot freely define new tags, so it does not meet the condition in the question. This contrast with XML is a classic exam point.
Incorrectウ
Java is an object-oriented programming language used to write processing procedures (programs). It is not a language that describes document structure with tags, and it has no concept of user-defined tags.
- エ
正解 The correct answer is エ, XML (Extensible Markup Language). XML is a markup language for describing the structure of documents and data; it gives meaning to information by enclosing it in tags written between “<” and “>”. Its greatest feature is, just as the name says, that it is extensible: users can define tag names and structures themselves to match what they are handling, as in <productName> or <price>. XML is the only choice that fits the condition in the question, namely that users can define and use tags according to their purpose. Because tag names can be decided freely, XML is used with formats defined independently for each field, such as data exchange formats between companies, configuration files, and storage formats for various kinds of data.
- XML = an extensible markup language whose tags users can define according to their purpose. It describes the structure and meaning of documents and data with tags enclosed in “<” and “>”, and is widely used as a format for data exchange and for configuration files.
- Learn the difference between HTML and XML. Both are markup languages that use tags, but HTML's tags are fixed by the specification and its purpose is to display web pages, while XML's tags can be defined freely and its purpose is to describe the structure and meaning of data.