Store HTML form data in XML format-3

Source: Internet
Author: User
Tags format html form
If you are using the above code in your own application, remember one thing, when the "Convertformtoxml" function is already running, such as
The XML file name already exists, then the file will be overwritten. Here, I recommend that you use a randomly created file before using the "Convertformtoxml" feature
Name. In this way, the risk of overwriting valuable data is reduced to zero.

For an example of the generation of XML files, examples are as follows:

Contact.xml

<?xml version= "1.0"?>
<contact>
<field id= "FirstName" taborder= "1" >
<field_value>Michael</field_value>
</field>
<field id= "LastName" taborder= "2" >
<field_value>Qualls</field_value>
</field>
<field id= "Address1" taborder= "3" >
<field_value>2129 NW 27th st.</field_value>
</field>
<field id= "Address2" taborder= "4" >
<field_value/>
</field>
<field id= "Phone" taborder= "5" >
<field_value>4055253988</field_value>
</field>
<field id= "Email" taborder= "6" >
<field_value>michaelq@vertiscope.com</field_value>
</field>
</contact>

I recommend that you copy the above code to a page on your personal Web server with the same name and run the example above. Make sure you are using the right
Your personal server valid path and file name.

When you are all ready, please check your XML file again.


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.