"XML Programming and Application Tutorial" Chapter 1 Exercise Answers

1. Fill in the blanks

  1. XML was mainly used for data transmission in the Internet in the early days .
  2. Extensible Markup Language XML is a subset of SGML .
  3. XML was originally designed for electronic data exchange .
  4. You can use XML to separate data from HTML files.
  5. The programming languages ​​WAP and WML are produced on the basis of XML .

Two, multiple choice questions

  1. XML was developed by the () working group (the original SGML editorial review committee).
    A.XML B. SGML C. W3C D.HTML

  2. In the following options, () is the advantage of using EDI (multiple choice).
    A. Reduce paper consumption
    B. Reduce duplication of labor and improve work efficiency
    C. Enable both parties to trade in a faster and more effective way
    D. Improve the relationship between the two parties

  3. Among the following options, () is the advantage of XML (multiple choice).
    A. Develop flexible web application software
    B. Data can be updated
    in granular form C. Publish data on the Web
    D. Integration of data from different sources

  4. In the following options, () is the work we can use XML to do (multiple choice).
    A. Exchange data
    B. Exchange of software design elements
    C. Create new language
    D. Separate data from HTML files

  5. Among the options below, () is the main function of Altova XMLSpy 2011 (multiple choice).
    A. Display and edit XML documents in multiple view formats
    B. Well-formedness check and built-in validator
    C. Structured editing
    D. Database import

Three, short answer questions

  1. What is XML?
    XML (Extensible Markup Language, Extensible Markup Language) is a set of rules that define semantic markup, which divides documents into many parts and identifies these parts. It is also a meta-markup language, which can define other semantic and structured markup related to a specific field.
  2. Compared with other structured information technologies applied to EDI, what are the advantages of XML?
    Low cost, XML does not require the high cost of VAN, and it is affordable for small and medium-sized enterprises.
    Custom business rules, XML allows users to create their own business rules and formats.
    Easy to explain, EDI needs translation software to get the information format of trading partners, and XML can easily interpret XML documents through a free download parser to meet this demand.
    The platform is independent, no matter what platform it is, transactions can be carried out.
  3. What are the advantages of XML?
    (1) More meaningful search.
    Data can be uniquely identified through XML. Without XML, search software must understand how each database is constructed. This is actually impossible, because each database describes the data in a different way. With XML, the situation is completely different. For example, student information can be classified according to student ID, name, or other criteria. This makes searching very convenient.

(2) Develop flexible web application software.
Once the data is established, the XML can be sent to other applications, objects or middle-tier servers for further processing. It can also be sent to the desktop and viewed in a browser. Together, XML and HTML, scripts, and public object models provide the necessary technology for the development of flexible three-tier Web application software.

(3) Integration of data from different sources.
Now it is practically impossible to search multiple incompatible databases. XML can easily combine structured data from different sources. Software agents can integrate data sent from back-end databases and other applications on the middle-tier server. Then, the data can be sent to clients or other servers for further integration, processing and distribution.

(4) Data obtained from multiple applications.
The extensibility and flexibility of XML allows it to describe data in different kinds of applications, from searched Web pages to data records. At the same time, since XML-based data is self-describing, data can be exchanged and processed without internal description.

(5) Local calculation and processing.
After the data in XML format is sent to the customer, the customer can use the application software to parse the data and edit and process the data. Users can process data in different ways, not just display it. The XML Document Object Model (DOM) allows scripting or other programming languages ​​to process data. Data calculation can be performed without going back to the server. Separating the interface for users to view data, using a simple, flexible, and open format, can create powerful application software for the Web, which can only be built on high-end databases.

(6) Various display of data.
After the data is sent to the desktop, it can be displayed in many ways. By describing the resulting data in a simple, open, and extended way, XML supplements HTML and is widely used to describe user interfaces. HTML describes the
appearance of the data , while XML describes the data itself. Since the data display is separated from the content, the data defined by XML allows different display methods to be specified, so that the data can be displayed more reasonably. Local data can be dynamically displayed in other ways defined by customers, user choices, or standards. CSS and XSL provide a unified and standard mechanism for data display.

(7) Granular update.
Through XML, data can be updated granularly. Whenever part of the data changes, there is no need to retransmit the entire structured data. The changed elements must be sent from the server to the client, but the changed data can be displayed without refreshing the entire user interface.

(8) Publish data on the Web.
Because XML is an open, text-based format. It can be transmitted using HTTP like HTML, without changing the existing network.

(9) Upgradability.
Since XML completely separates the concept of identification from display, the processor can nest programmatic descriptions in structured data to show how to display the data. This is an unbelievable and powerful mechanism that reduces the interaction between the client computer and the user as much as possible, while reducing the amount of data exchange on the server and the response time of the browser. In addition, XML enables personal data to be changed only through updated notices, which reduces the workload of the server and greatly enhances the upgrade performance of the server.

(10) Compressibility.
The compression performance of XML is very good, because the tags used to describe the data structure can be reused. Whether or not XML data is compressed depends not only on the application, but also on the amount of data transferred between the server and the client.

Guess you like

Origin blog.csdn.net/weixin_44895666/article/details/108682968