Topic: xml updating pro. Pages that link to <a href="https://ozoneasylum.com/backlink?for=24950" title="Pages that link to Topic: xml updating pro." rel="nofollow" >Topic: xml updating pro.\

 
Author Thread
Tekapo
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2004

IP logged posted posted 02-07-2005 04:45 Edit Quote

Hi, guys. How are you? Would you help me out this, please?
I am trying to update my xml file called testsave.xml.
In my asp file called testsave.asp, some reason, the access to xml file has been
denied. I don't understand why. Basically this source comes from http://www.brinkster.com/CodeBank/ShowSnippet.aspx?n895.
Well, does this line problem???

code:
objXML.save(Server.MapPath("testsave.xml"))



Do you see why??? Both file is sitting in same directory in wwwroot folder.
Many thanks in advance. Cheers.
testsave.xml
--------------------------------------------------------------
<?xml version="1.0"?>
<page>
<title>test</title>
</page>


testsave.asp
--------------------------------------------------------------
[/code]

code:
<%
'This code and the XML are in the db directory (the only R/W directory for Brinkster General Users)

'Load xml
set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = false
objXML.load(Server.MapPath("testsave.xml"))

'Set root object (points to page tag)
set objRoot = objXML.documentElement

'Create and Append the title element under the root (page) tag
set objTitle = objXML.createElement("title")
objRoot.appendChild(objTitle)
objTitle.text = "Hello World!"

'Save xml
objXML.save(Server.MapPath("testsave.xml"))

Set objXML = Nothing
%>



(Edited by Tekapo on 02-07-2005 04:49)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu