PDA

View Full Version : how to i write an asp file that allows me to create a new xml file on the c:/ with pr


wanye
09-27-2002, 08:29 AM
hi guys.... how to i write an asp file that allows me to create a new xml file on the c:/ with processing instruction and tags like

<?xml version="1.0"?>
<content>
<title></title>
<s-title></s-title>
<p1></p1>
<p2></p2>
<image><image>
<p3></p3>
<image1></image1>
</content>

Also, how do i write a html form that allows me to write value to these tags calling to this asp file and update it on c:/ when i click on a submit button....??

I realli need urgent help on this but i realli dunno how to do so..becoz i am realli an idiot in asp....

Thx...

glenngv
09-27-2002, 10:07 AM
http://www.asp101.com/articles/michael/htmlxml/default.asp

wanye
09-27-2002, 10:56 AM
hi, glenngv.... i haf oso seen this example before... but the tag elements is being looped and ID is set for each one in this example... whereas i need to create different elements.... and i dun want to set ID for it..
Now my problem is how to write the asp file and the html form such that the form can add values to each of the individual tags without assigning ID to each one + the looping part...?? can show me a detail example plz...? thx alot! ....

glenngv
09-27-2002, 11:19 AM
Set objTitle = objDom.createElement("title")
objTitle.Text = Request.Form("title")

Set objSTitle = objDom.createElement("s-title")
objSTitle.Text = Request.Form("stitle")

Set objP1 = objDom.createElement("p1")
objP1.Text = Request.Form("p1")

Set objP1 = objDom.createElement("p1")
objP1.Text = Request.Form("p1")

'and so on...

objRoot.appendChild objTitle
objRoot.appendChild objSTitle
objRoot.appendChild objP1
objRoot.appendChild objP2
'and so on...


just change to appropriate name in Request.Form