虎克的博客

Enthusiasm Biogeography-Biodiversity Informatics-Data Sciences

XML的优点

| Comments

XML Is an Industry Standard


As you learned previously, XML is a W3C recommendation. This means it is an industry standard
governed by a vendor-independent body. History shows that vendor-specific proprietary
standards don’t get massive acceptance in the software industry. This nonacceptance affects
overall cross-platform data sharing and integration. Being an industry standard has helped
XML gain huge acceptance.

XML Is Self-Describing


XML documents are self-describing. Because of markup tags, they are more readable than, say,
comma-separated values (CSV) files.

XML Is Extensible


Markup languages such as HTML have a fixed set of tags and attributes—you cannot add your
own tags. XML, on the other hand, allows you to define your own markup tags.

XML Can Be Processed Easily


Traditionally, the CSV format was a common way to represent and transport data. However, to
process such data, you need to know the exact location of the commas (,) or any other delimiter
used. This makes reading and writing the document difficult. The problem becomes severe
when you are dealing with a number of altogether different and unknown CSV files.
As I said earlier, XML documents can be processed by a piece of software called a parser.
Because XML documents use markup tags, a parser can read them easily. Parsers are discussed
in more detail later in this chapter.

XML Can Be Used to Easily Exchange Data


Integrating cross-platform and cross-vendor applications is always difficult and challenging.
Exchanging data in heterogeneous systems is a key problem in such applications. Using XML
as a data-exchange format makes your life easy. XML is an industry standard, so it has massive
support, and almost all vendors support it in one way or another.

XML Can Be Used to Easily Share Data


The fact that XML is nothing but textual data ensures that it can be shared among heterogeneous
systems. For example, how can a Visual Basic 6 (VB6) application running on a Windows
machine talk with a Java application running on a Unix box? XML is the answer.

XML Can Be Used to Create Specialized Vocabularies


As you already know, XML is an extensible standard. By using XML as a base, you can create
your own vocabularies. Wireless Application Protocol (WAP), Wireless Markup Language
(WML), and Simple Object Access Protocol (SOAP) are some examples of specialized XML
vocabularies.

Comments