Detailed introduction to the relationship between Asp and XML

黄舟
Release: 2017-03-24 16:24:32
Original
1572 people have browsed it

1. What is XML?
XML is just a data storage format, which is a text (although the XML specification also provides a solution for storing binary data).

In fact, there are many text formats that can be used to store data, such as the familiar .ini file. When many friends first learn C language or Basic language, sometimes they may need to store the source data or final results in a text file. The storage format is of course determined by the person who writes the program. So in the process of writing this program, The programmer created a custom data format.
The XML format itself is also a format for storing data. It is essentially the same as the data file you defined at that time, but the only (and most important) difference is that the XML format is recognized by everyone. And it is widely supported, but the data file you made yourself is only supported by the one or two programs you wrote.
 2. What does XML do?
XML is only used to store data, it does nothing else.
Although XML does nothing, because it is a unified format, this format is supported regardless of the Unix platform, the Macintosh platform, or the Windows platform.
If Java is a cross-platform programming language, then XML is a cross-platform data format. It is precisely for this reason that these two cross-platform things are so closely integrated. Most of the XML applications I saw a few years ago were implemented using Java technology. But many other languages ​​(such as C#, Perl, Python) also support XML very well.
Unification will inevitably bring great benefits, that is: there are many technical solutions to support it and extend it, such as: DOM, XSLT, SVG, VRML, SOAP, Cocoon, XSP, etc.
 3. What XML does not do
 XML is not responsible for running programs, nor is it responsible for the representation of data. The representation of data can be realized through XSL or CSS. Programming languages ​​such as Asp and Java will naturally be used to run the program, while XML does nothing except storing data.
 4. The relationship between XML and Asp
ASP is a user of XML. XML provides a data storage format for ASP and other technical solutions, which can be called by other technical solutions including Asp. The relationship between them is so simple.
 5. Is "no refresh" the result of Asp?
"No refresh" is not the fault of Asp.
Asp controls the background, and no refresh is what the client technology has to do. Normally this will be done by JavaScript. Of course, it doesn't matter if you insist on using VBScript, but the price is that browsers like Mozilla and Firefox will not support it.
 6. The relationship between XML and database
XML can be used alone as a small database, or as a cache for large and medium-sized databases (such as SQL Server, Oracle, MySQL, DB2).
When the amount of data is small, the efficiency of the database engine in reading and writing data is definitely better than that of reading and writing data through text files. But we can imagine that when the amount of data in the database is large, the time it takes to read and write a record in such a database is different from the time it takes to read and write an XML file that is not very large. The former requires a lot of server time. The resources are much greater. Therefore, we can use XML as a lightweight small database to cache data.
7. Can XML replace the database?
The answer is of course no. Conversely, databases cannot replace XML.

The above is the detailed content of Detailed introduction to the relationship between Asp and XML. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template