Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save new client side info on XML file to IIS server,

Status
Not open for further replies.

smuckers

Programmer
Mar 5, 2002
31
US
Good Afternoon:

I'm trying to save my updated XML file on the client side to the XML file located on a virtual directory on my IIS server. I can update and add elements and new information on my HTML page with test.xml loaded.

I see that most information for saving new XML information is related to the client side. Not sure of the process to update the new information on my IIS server. The text below is what I tried with no luck.

<%@ Language=VBScript %>
<%
dim fso
const ForWriting = 2
set fso = Server.CreateObject(&quot;scripting.filesystemobject&quot;)
set file = fso_OpenTextFile(server.MapPath(&quot;test.xml&quot;),ForWriting,true)

file.write request.Form(&quot;text2&quot;)
response.Write Request.Form(&quot;text2&quot;)
response.Redirect &quot;test.htm&quot;
%>

Thank you in advance for your help!

Smuckers
 
Your xml content is stored as string in
Code:
request.Form(&quot;text2&quot;)
?
If so, do the following :
Code:
  Set objXML = CreateObject(&quot;Microsoft.XMLDOM&quot;)
  objXML.async = False
  objXML.loadxml (request.Form(&quot;text2&quot;))
  objXML.save(path)
where &quot;path&quot; is an unc path (not url) to the place you want to save your xml ON THE SERVER. Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top