Home >Backend Development >XML/RSS Tutorial >Crazy XML study notes (10) ---------The role of XML
I haven’t sorted out the knowledge of XML for a long time. It’s time to sort it out. On the one hand, the teacher has almost finished the lecture. It’s time to review it and sort out my ideas. Learning it once will not be in vain. Yeah, on the other hand, I hope to thoroughly master the knowledge of XML. Let’s start with
Let’s summarize the main uses of XML, and also to encourage myself to better master XML. In fact, XML has many functions!
Previously summarized the URL of xml knowledgehttp://www.php.cn/
##XML is used in many aspects of web development and is often used to simplify the storage and sharing of data.
If you need it in HTML Displaying dynamic data in the document will take a lot of time to edit the HTML every time the data changes.
With XML, data can be stored in separate XML files. This way you can focus on using HTML for layout and display, and ensure that modifying the underlying data doesn't require any changes to the HTML.
With a few lines of JavaScript, you can read an external XML file and then update the data content in the HTML.
##XML simplifies data sharing
XML data is stored in plain text format, thus providing a software- and hardware-independent method of data storage.
This makes it easier to create data that different applications can share.
XML simplifies data transmission
One of the most time-consuming challenges for developers has always been exchanging data between incompatible systems on the Internet.
Exchanging data with XML reduces this complexity because data can be read by a variety of incompatible applications.
XML simplifies platform changes
XML data is stored in text format. This makes XML easier to extend or upgrade to new operating systems, new applications, or new browsers without losing data.
XML makes your data more useful
Different applications can access your data, not just in HTML pages, but also from XML data sources.
With XML, your data can be used by a variety of reading devices (handheld computers, voice devices, news readers, etc.), as well as by people who are blind or otherwise disabled.
XML is used to create new Internet languages
Examples include:
If they are all rational, then Let future applications use XML to exchange data. In the future, there may be word processing software, spreadsheet programs, and databases that can read each other's data in plain text format without using any conversion programs. All we can do now is pray that Microsoft and all other software developers get on the same page. Other functions: 1. Data exchange
Use XML in The exchange of data between applications and companies is no secret and should undoubtedly be listed first.
So why is XML so important in this field? The reason is that XML uses elements and attributes to describe data
. During the data transfer process, XML always retains data structures such as parent/child relationships. Several applications
can share and parse the same XML file without having to use traditional string parsing or dismantling processes.
In contrast, ordinary files do not describe each data segment (except in the header file), nor do they retain the data relationship structure. Using
XML for data exchange can make applications more flexible, because XML data can be accessed by location (as with ordinary files) or by element
name (from a database).
2. Web Services
Web services are one of the most exciting revolutions, which allow people using different systems and different programming languages to communicate and share data with each other. The basis is that Web servers use XML to exchange data between systems. The exchanged data is usually marked with XML, which can make the protocol consistent with the specification, such as on the Simple Object Access Protocol (Simple Object Access Protoc
ol, SOAP) platform.
SOAP can pass messages between objects constructed in different programming languages. This means that a C# object can communicate with a
Java object. This communication can even occur between objects running on different operating systems. DCOM
, CORBA or Java RMI can only pass messages between tightly coupled objects, while SOAP can
pass messages between loosely coupled objects.
3. Content Management
XML only uses elements and attributes to describe data, but does not provide a method for displaying data. In this way, XML provides an excellent way to mark content that is platform- and language-independent.
Using languages like XSLT, XML files can be easily converted into various format files, such as HTML, WML, PD
F, flat file, EDI, etc. XML's ability to run between different system platforms and convert into different formats of target files makes it an excellent choice for content management application systems.
4. Web integration
More and more devices now support XML. Allows Web developers to use XML to transfer data between personal electronic assistants and browsers.
Why send XML text directly into such a device? The purpose of this is to allow users to have more control over the data
display method and experience the joy of practice. In the conventional client/service (C/S) method, in order to sort the data or
change the display format, a request must be made to the server; while XML can directly process the data without requesting a query to the server - return As a result of this two-way "journey", there is no need to configure a database on the device.
You can even modify the XML file on the device and return the results to the server. Imagine what a big impact a refrigerator with Internet capabilities and XML support would have on the market. You no longer have to get up early to get milk
!
5. Preparation
Many applications store preparation data in various files, such as .INI files. Although this file format has been used for many years and continues to work well, XML is a superior way to mark up data for applications. Using classes in .
NET, such as XmlDocument and XmlTextReader, to mark the preparation data in XML format can make it more
readable and can be easily integrated into the application system. Applications that use XML configuration files can easily handle the required data without having to recompile to modify and maintain the application system like other applications.
The above is the content of Crazy XML Study Notes (10)---------The role of XML. For more related content, please pay attention to the PHP Chinese website (www .php.cn)!