将HTML表单数据存储为XML格式__教程 |
|
日期:2007-5-20 1:13:28 人气:139 [大 中 小] |
|
|
|
Set objAttID = objDom.CreateAttribute("ID") ’Set the value of the id attribute equal the the name of ’the current form field. objAttID.Text = Request.Form.Key(x) ’The setAttributeNode method will append the id attribute ’to the field element. objField.SetAttributeNode objAttID ’Create another attribute, "taborder". This just orders the ’elements. Set objattTabOrder = objDom.createAttribute("taborder") ’Set the value of the taborder attribute. objAttTabOrder.Text = x ’Append the taborder attribute to the field element. objField.SetAttributeNode objAttTabOrder ’Create a new element, "field_value". Set objFieldValue = objDom.CreateElement("FieldValue") ’Set the value of the field_value element equal to ’the value of the current field in the Form Collection. objFieldValue.Text = Request.Form(x) ’Append the field element as a child of the root element. |
|
出处:本站原创 作者:佚名 |
|
|