Current location - Quotes Website - Signature design - Application analysis of XML
Application analysis of XML
Dufudian

(Hainan Provincial Land, Environment and Resources Information Center, Haikou, 570206)

Data exchange exists in the system, and the data and information transfer between the upper and lower levels related to "Golden Soil Project". The data exchange form based on XML can solve the security, reliability, flexibility and openness of data exchange, and provides a simple and efficient data exchange method for "Golden Soil Project".

Keywords: "golden soil project"; XML data exchange; Data bus

"Golden Land Project" is the framework project of land and resources informatization construction, and data will be one of the core contents of the project. Due to the heterogeneity of data content, data types and data formats involved in the "Golden Land Project", data exchange is an indispensable part of the "Golden Land Project". The data bus mode based on XML technology will provide a loosely coupled, clear, extensible, easy to maintain, open and unified data exchange platform for the exchange between systems, data, upper and lower levels, and even between systems and data.

1 data exchange system of "golden soil project"

"Golden Land Project" will adopt the idea of service-oriented technical framework and e-government platform, emphasizing the practicability, universality, reliability and safety of technology, and ensuring the expansibility, maintainability, openness and unity of the system.

In the construction of data resources, the mainstream GIS platform, object-oriented database and other technologies are adopted to build and integrate various databases according to unified standards, and the unified management and maintenance of data are realized through the combination of centralized and distributed management, multi-level backup and relatively independent data management mechanism.

In terms of application system construction, it is necessary to make overall planning and build a land and resources business application system through e-government platform.

No matter in or between data resources or application systems, data exchange must be carried out to form a data exchange system. Data exchange system includes basic database synchronization and backup exchange system, exchange system of business information transmission at all levels, exchange system of external data sharing, and even data exchange between internal modules of the system.

The basic database synchronous backup exchange system mainly realizes the timely and automatic synchronous update of the subordinate database to the superior database.

The exchange system of business information transmission at all levels is mainly used to realize business data exchange, statistical data reporting, material reporting or distribution between superior and subordinate business processes in vertical business systems.

The foreign data sharing and exchange system mainly realizes the exchange of basic data related business data between the land and resources system and other departments.

It faces the data exchange between modules in the system, and mainly realizes the data exchange in the process of data calculation and processing between modules.

The data exchange system must solve the security, reliability, flexibility and openness of data exchange, and it is a good choice to adopt XML technology as the basis of the data exchange system of "Golden Soil Project".

Development and characteristics of 2 XML

2. Development of1XML

So far, web pages written in HTML account for a considerable proportion. HTML is easy to learn, universal, concise and compact in grammar, and its extended functions, such as tables, frames and scripts, make it display its talents on the Web homepage. However, with the more and more extensive application of the Web, the weakness that HTML is too simple becomes more and more obvious.

(1) Link cannot be corrected automatically after it is lost. Because the URL address of many pages changes frequently, when browsing these pages, you will encounter annoying information that 404 URL address can't be found. You have to manually change the URL address of the linked pages one by one, which greatly increases the maintenance workload of the pages.

(2) There are too many downloads of dynamic content. At present, the appearance properties of pages created with HTML cannot be updated, such as color, font, background and so on. Only new pages or Java parts can be downloaded again. But the data search engine saved by Java is inaccessible, so it is not omnipotent to display dynamic content in HTML pages with Java.

(3) The search time is long. Because HTML pages do not have a database-like structure, it is necessary to scan all the contents of all pages when searching for targets in such documents, and often a large number of contents unrelated to keywords are retrieved. This is because HTML cannot distinguish between information and meta-information. Moreover, HTML does not support information nesting architecture, which limits the full-text retrieval function.

(4) HTML lacks support for double-byte or multilingual characters, or the support is insufficient. For example, the format of Chinese information pages will be uneven under different platforms.

(5) Poor extensibility of HTML Scientists cannot write mathematical formulas, chemical equations and molecular crystal structures in HTML.

In order to solve these shortcomings, Extensible Markup Language (XML for short) came into being.

1998 In February, the World Wide Web Association (W3 C) published the standard XML 1.0. XML is a meta-markup language, which provides a format to describe structured data, and is a subset of SGML (generalized markup language standard ISO 8879: 1986) defined by W3C for optimizing network transmission. XML ensures that structured data is consistent and independent of applications or programs.

2.2 the characteristics of XML

Since the advent of XML, it has been praised as a powerful tool in the process of information standardization with its advantages of standardization, interface protocol, simplification and encapsulation, and XML-based standards will become the mainstream of future information standards.

2.2. 1 standardization

Compared with other service technologies, standardization is one of the characteristics of XML. XML provides a standard format for data transmission between systems. The World Wide Web Consortium (W3C) manages XML standards and publishes them to XML technology providers around the world, which ensures the compatibility of XML products. In addition to XML engines and products, there is also XML syntax. Each XML syntax is a standard way to format data in a specific problem area. By following and adopting XML syntax, anyone can standardize the data format of communication between two application systems.

2.2.2 interface protocol

When programming an interface, it is usually called a protocol. From a programming point of view, the interface provides a programming structure without public implementation. If you use DTD (Document Type Definition) and schema, XML has similar characteristics. Both DTD and outline are used to describe the structure of XML documents and the rules for establishing XML documents. One (or more) related DTD (or outline) can be used to organize such a set of rules, which is called XML syntax.

XML syntax can not only be used to standardize the communication between applications, but also provide an interface protocol for developers. In other words, when creating an application that needs to use XML document structure, developers don't need to know how the document is implemented (that is, the actual XML document). DTD and outline describe the structure of documents and can be used as interface protocols for development. Any change to the DTD will also change the protocol.

simplify

Another important aspect of XML document is its simplification, which means that the concept and general method of XML are simple. For example, XML is based on text documents, which simplifies the process of opening XML documents and viewing their contents.

Simplifying the Web service model with XML is both convenient and important. Web services are inherently more complex than XML alone. Assuming that XML and CORBA are equally complex, and other Web service technologies are equally complex, Web service technologies will become very complicated. However, by using simple building blocks, such as XML and SOAP, the complexity of Web services can be controlled within a tolerable range, so the applications created with it will not be difficult to control.

package

Encapsulation is one of the characteristics of XML, especially when developing Web services. Essentially, encapsulation refers to the concept of taking one or more data blocks and assembling them into a simple object (rather than several independent objects). Encapsulation is similar to aggregation, but there is an important difference between them, that is, encapsulation generally means that it has no external dependence.

You can create XML documents with external dependencies, but in the transactional Web service model, it is more sensible to use encapsulation. By designing an XML solution that wraps dependencies, problems in transaction processing can usually be eliminated. Especially in the case of frequent changes in external data, it is harmful to forcibly locate external data in transactions and make it consistent with XML data. If the data is encapsulated by XML syntax, the correct data can be obtained through transactions.

Application analysis of 3 XML data bus

3. 1 XML to build the data exchange bus of "Golden Soil Project"

Through the open XML data bus technology, the data exchange between various systems and levels of "Golden Soil Project" is realized. The XML data bus consists of four parts: publishing, integration, distribution and automation, as shown in the following figure.

XML data bus diagram

Publishing data bus is a data exchange that presents the same data content in different forms at the client according to different user needs. The data display is separated from the content through the data bus, and the data defined by XML allows different display modes to be specified, making the data more reasonable. As a supplement to HTML, XML is gradually widely used to describe user interfaces, forming HTML to describe data, while XML describes the appearance of data itself.

Local data can be dynamically displayed through customer configuration, user selection or other standard decisions. CSS and XSL provide a publishing mechanism for data display. Through XML, data can be updated in the form of granularity. Every time a part of the data changes, there is no need to resend the whole structured data. The changed elements must be sent from the server to the customer, and the changed data can be displayed without refreshing the entire user interface. HTML mode has been changed. As long as one piece of data changes, the whole page must be rebuilt, which seriously limits the performance of the server.

In addition, other data can be added to the data published through XML bus, and the added data can enter the existing page without the browser sending a new page again.

Integrated data bus is the data exchange between two or more heterogeneous databases between systems.

The system interacts with these databases with different complex formats through XML standard language, which is due to the customization and extensibility of XML, making it enough to express various types of data. After receiving the data, the system can process it or transmit it between different databases. XML solves the unified interface problem of data exchange.

XML endows the system with powerful functions and flexibility. For example, for more meaningful search, the data is uniquely identified by XML. Without XML, search tools must know how each database is built, but this is actually impossible because almost all databases describe data in different formats. Due to the integration of data from different sources, it is actually impossible to search various incompatible databases now. Through XML data bus, structured data from different sources can be easily integrated, data from back-end databases and other systems can be integrated on middle-tier servers, and then the data can be sent to customers or other servers for further collection, processing and distribution, thus realizing data exchange between databases.

Distributed data is a data exchange method that transfers most of the processing load from the server to the client through the data bus.

Customers can choose and make different application systems to process data according to their own needs, and the server only needs to send the same XML file. For example, according to the traditional "client/server" working mode, the client sends different requests to the server, and the server responds separately, which not only increases the load of the server itself, but also requires the network administrator to investigate different user needs in advance to make corresponding different solutions. However, if the user's needs are complex and changeable, it is not appropriate to concentrate all business logic on the server, because the server-side service system may not be able to meet many application needs and can't keep up with the changes in demand, and both parties are late. The application of XML data bus gives the initiative to process data to customers. What the server does is to package the data into XML files as perfectly and accurately as possible, and exchange them through the bus to form their own requirements and perform their duties. Using the self-explanatory feature of XML, the client can understand the logical structure and meaning of data while receiving it, thus expanding the extensive and universal distributed computing model.

Automatic data bus is a way to follow the same data exchange standard, which makes the application program have certain automatic processing ability, so as to realize editing, adding and deleting the obtained information to meet the needs of users and improve work efficiency. The steps of developing a typical intelligent agent program for land and resources management application are as follows: ① The program sends a data update request to the data exchange system of the land and resources management department at the next higher level, and automatically connects all the sites of the land and resources department at the same level provided in the reply; (2) searching the information of predetermined data, and comparing the obtained information of different sites according to certain rules; (3) Get the required results and automatically send a data update notice to the land and resources management department of the site.

3.2 characteristics of XML data bus

Security of data exchange

In the design of data exchange center, XML document is used as the medium of data exchange. Now there are very mature methods for document encryption, so the whole XML document can be encrypted and sent to one or more recipients safely after digital signature authentication, and the data recipients can use it after receiving the XML data document.

System reliability

In the design scheme of the data exchange center, considering that the whole data exchange center exists as an independent application service component in the information system environment of the land and resources management department, it does not depend on any independent information system, and the system will not be affected by the unexpected collapse of the information system.

The exchange center is separated from the database, that is, under normal circumstances, the data exchange center does not interoperate with the database of any information system or other professional systems, and all data processing is the responsibility of the data owner and requester. This design method not only ensures the independence and security of each system, but also ensures the interaction between systems.

The data exchange center exists in the application server environment, and the dynamic load balancing and fault recovery functions provided by the application server environment can be used to ensure the long-term reliable operation of the data exchange center.

Flexibility of the system

The data exchange center provides two data exchange modes: message-based data exchange mode and data exchange center reading and writing data directly to adapt to various system environments.

Message-based data exchange is the first choice of data exchange center, in which the data exchange center exchanges data asynchronously with the system supporting message mechanism. The initiator of data exchange submits the message in XML format to the data exchange center and continues to perform other tasks until the message of data exchange completion is received from the data exchange center, and then the required data is processed. In the message-based data exchange mode, the data exchange center manages the whole process of messages to ensure the receiving order of messages and the correctness of data.

The data exchange center also provides a data exchange mode, in which data is directly read by the data exchange center. In this mode, the data exchange center mainly interacts with the system that passively provides data. Those systems only need to provide data, not data, and the system structure is relatively simple.

Openness of system

The data exchange center provides message control API and data conversion protocol customization tools. As long as the data conversion protocol is added to the data exchange center through the data conversion protocol customization tools, any system can exchange data with the data exchange center using the message control API provided by the data exchange center.

Because XML standard has expansibility and powerful self-description function, it improves the traditional data representation method, which is not only very suitable for data exchange and information release, but also will increasingly become the basis of display and index. Now almost all databases have provided XML transformation tools, so XML documents are very suitable for data exchange in cross-system and cross-platform "Golden Land Project". With the emergence of XML as a standard way to exchange data, applications based on XML will become simpler and more efficient.

refer to

[1] Ministry of Land and Resources. Guo tu zi fa [2004] No.23 "Notice on Printing and Distributing the National Master Plan of Gold Soil Engineering Construction". 2006

[2] Jin Yuanji, Cai Qijun. "Component-based knowledge engineering architecture." JOOP, 1999.

[3]Ritter, D. The Missing Link in D2B E-commerce. Intelligent enterprise, 1999

[4] Gao Bo, Yan Wang and Ben Chang. Oracle, XML development manual, Beijing: Machinery Industry Press, 200 1.

[5] XML China Forum. Advanced practical course of XML. Beijing: Tsinghua University Publishing House, 200 1.

Wang Zhong, Chen Xiaoou. Research on data exchange and access technology based on XML. Computer engineering and application, 200 1.

Xu Tianxin, Jin Ye, Li. Design and Implementation of Symmetric Web-EDI System Based on XML, Computer Integrated Manufacturing System-CIMS, 200 1.

[8] He Rong, Fang,. Design of e-commerce order processing pipeline based on XML. Computer applications, 2002