Store HTML form data in XML format

Source: Internet
Author: User
Tags html form

If you are familiar with Asp,xml and HTML4. 0, please read the following example
Save form data in XML format
Typically, data submitted by a form in an ASP is typically written to the database. However, if you want to make it easier to send data, you can write it as an XML file format. This approach is more useful for data collected on the Web. Because XML is very simple for the platform you use, you don't need to convert the data format.
To write the submitted data as an XML document, you need to create a new XML document from Microsoft Xmldom object. Microsoft Xmldom object has a library of extensible objects that enables you to create elements,attributes and values that can be made into an XML document by creating these items. I can't make a complete presentation of the entire target model because it contains too much content, and for the site to be built, the target model can even form a relatively complete part of itself.
After Xmldom object is created, the structure of the XML is demonstrated by creating a goal, which is about the elements that makes up each layer of the XML document. Next, give an example of how XMLDOM was created. After you create the root element, attach it to the xmldom file. The child elements is then created and appended to the root element, and the document is finally stored.
Demo Microsoft Xmldom objects
<%
Dim Objdom
Dim Objroot
Dim ObjChild1
Dim ObjChild2
Dim OBJPI

The Xmldom object is created using the CreateObject method of the Server object
Set objdom = Server.CreateObject ("Microsoft.XMLDOM")
"Creates a IXMLDOMElement object using the Xmldom Createelemnet method.
The Createelemnet method has another string parameter, which represents the name of the element.
The return value is passed to the Objroot variable. Objroot represents the root element of an XML document ...

Set objroot = objdom.createelement ("RootElement")

"Use the AppendChild method of the XMLDOM Object to add the Objroot
The Element Reference to the XML Document.

Objdom.appendchild Objroot

"Now, following the same steps, you'll create references to the

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.