You are currently viewing the XML section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
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