First, the reader guide
The Reader guide helps you master the outline of this article. Lest you read most of it to understand this article is not suitable for you, causing you visual pollution.
If you're writing a program with Asp+xml, or you're learning XML, it's worth seeing.
Read the knowledge required in this article, have a basic understanding of the ASP, have a basic understanding of XML and DOM, if you do not understand then you can basically hold the Asp+xml and DOM applications by studying this article, and can write out the Asp+xml programs that are more advanced according to Ben Wen van.
Ii. Basic Ideas
The idea of this paper is to use ASP and DOM to read and store XML data, and to store message information with XML data to achieve the function of storing data in the same database.
Third, the advantages of the XML message book
Perhaps you will be asked to use Asp+txt text can also be achieved without the database of the function of the message, good indeed can do, and there are many online such a message this free download, but here I want to talk about the advantages of asp+xml.
1, xml+asp faster than asp+txt speed. You may also find that when the TXT file is very rare when the speed is surprisingly fast, but as the message information increased TXT text, speed is surprisingly slow this is the weakness of asp+txt. Of course I can't say asp+xml must have been surprisingly fast, but it's a lot quicker than asp+txt, of course, with the increase in message information the XML text increases quickly, but it's a lot better than txt (this can be tested from the was test that readers can test themselves), Of course, asp+xml than the database, because the database for the query to do a special optimization, and XML is only plain text, in the ASP to create the image is to read all the XML data into memory, if the amount of data can imagine the speed will slow down. Then you might ask me, when do I use relational databases to store data, and when do I store data in XML? I'm also going to mention here that when the data is more complex and random, it's more appropriate to use XML data, and that's when you plan to read and use the data on different operating systems. Do not use XML files to store data if you are not in a critical moment or do not support the database's space.
2, easy to read the XML data, txt text is more difficult to operate, we must read a row of judgment, but also very multi-functional can not be, can only prepare a relatively simple message, and the XML data is different, using DOM can easily access each node, Instead of txt those annoying readline () witeline (), we can randomly add delete update a certain we are interested in the node, the use of ASP or JS or data island can easily do this, of course I am here to consider compatibility, with ASP to read XML data, Instead of using the data island to read the node data (since only IE5 versions support data island Technology) and ASP to actually do not exist these questions because the customer is getting HTML files.
3, the XML data Kua operating system, as long as we store this data as XML so that the data can be He Ki it language or system recognized, without doing what should be changed. TXT obviously does not have these performance. For example, our message on the Internet can be directly converted into a WAP format on the phone to display.