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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing to XML using ASP

Status
Not open for further replies.

DaveC426913

Programmer
Jul 28, 2003
274
CA
I need to write to an XML file using ASP. Can someone just show me the barebones? I've got the file open, the changes made, I just need to write the file.

This is what I've got:

Set XMLDoc = Server.CreateObject("Microsoft.XMLDOM")
XMLDoc.load(Server.MapPath("snowreport.xml"))
Set rootNode = XMLDoc.documentElement
Set snowreport = XMLDoc.createElement("snowreport")

Set resort = XMLDoc.createElement("resort")
snowreport.appendChild(resort)
Set Name = XMLDoc.createElement("name")
name.Text = "C"
resort.appendChild(name)

Response.Write snowreport.xml
 
wrong forum,
please try the ASP forum (forum855)

Known is handfull, Unknown is worldfull
 
Doh! Don't know how that happened! I guess I'd done a search and ended up in a forum other than where I thought I was!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top