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
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.
"Now, following the same steps, you'll create references to the
"Child elements for the XML Document." The only difference are, when the
"Child elements are appended to the document, you'll call the
"AppendChild method of the IXMLDOMElement Object rather than the
"AppendChild method of the Xmldom Object. By using the IXMLDOMElement
"To append the Chi en, your are differentiating (and applying tiered
"Structure to" is the child elements from the root element.
Set objChild1 = objdom.createelement ("ChildElement1")
Set objChild1 = objdom.createelement ("ChildElement2")
"The final step to take care of before saving this document are to add
"An XML processing instruction." This is necessary the XML parsers
"Would recognize this document as an XML document."
Set OBJPI = objdom.createprocessinginstruction ("xml", "vertsion=" 1.0 "")
"Call the InsertBefore method of the ' xmldom Object in ' to insert
"The processing instruction before the root element (the zero element
In the XMLDOM childnodes Collection).
Objdom.insertbefore Objpi, objdom.childnodes (0)
"Calling the Save method of the XMLDOM Object would save this XML
"Document to your disk drive. In this case, the document would be saved
"To the" C: "Drive and would be named" Myxmldoc.xml ". When saving an
"XML document, if the file does not exist, it'll be created." If it
"Does exist, it'll be overwritten.