I made a simple xml message board when I started learning xml.
-------------------------------
Create a new XMLDOMobject
server.createObject("Microsoft.XMLDOM")
--------------------------------
Load an xml file
setobjXML=server.createObject("Microsoft.XMLDOM")
filepath=server.mappath("list.xml")
objXML.load(filepath)
You cannot load ("list.xml") directly here, otherwise an error will occur
--------------------------------
Finding a single node
setobjXML=server.createObject("Microsoft.XMLDOM")
destNode=objXML.selectSingleNode("NewList")
There is a priority here that this singlenode cannot be "root"
--------------------------------
Save xml file
setobjXML=server.createObject("Microsoft.XMLDOM")
filepath=server.mappath("list.xml")
objXML.save(filepath)
--------------------------------
Add an xml node
xmlNode="..."
setobjXML=server.createObject("Microsoft.XMLDOM")
objXML.loadXML(xmlNode)
newNode=objXML.documentElement
myXML.appendChild(newNode)
--------------------------------
item parameters
myXML.childNodes.item(2).text
Point to a specific Node in case of multiple childNodes
Demo address: http://www.xunuo.net/other/code/index.asp
Download address: http://www.xunuo.net/other/code/leave.rar