
I am a beginner when it comes to ASP/XML. This is very easy for me in ASP.NET/C# but not so with classic ASP. how to update a xml file. I have tried many things but get nothing Or get a copy of the node I am trying to update. Please help me with an example. I am using classic ASP and VBSCRIPT.
Also I get 'object not found' on my xml file. Here is my code when I try to save it or display it as .xml I get the error msg. Any help will be much appreciated. The XML is in a hidden form.
Set clientSideXMLDoc2 = Server.CreateObject( "Microsoft.XMLDOM" )
// load the xml that is in a hidden form
clientSideXMLDoc2.load (""form1.txtXML.value"")
// val = the selected Camp name
xPath = "//Camp"
set books = clientSideXMLDoc2.selectNodes(xPath)
for each book in books
if (book.selectSingleNode("Camp).text = val ) then
<<<<<<<<< This is where I need to make my update?.
MsgBox(val)
end if
Next
clientSideXMLDoc2.save (Server.MapPath("SampleCampaign.xml"))
If Err.Number <> 0 then
MsgBox("<br><br>2 There has been an error on change: " & Err.Number & " - " & Err.Description)
Error.Clear
end if