XML을 배우기 시작했을 때 간단한 XML 게시판을 만들었습니다.
-------------------------------
새 xmldomobject를 만듭니다
server.createobject ( "microsoft.xmldom")
--------------------------------
XML 파일을로드하십시오
setobjxml = server.createobject ( "microsoft.xmldom")
filepath = server.mappath ( "list.xml")
objxml.load (Filepath)
여기에서 직접로드 할 수 없습니다 ( "list.xml"). 그렇지 않으면 오류가 발생합니다.
--------------------------------
단일 노드 찾기
setobjxml = server.createobject ( "microsoft.xmldom")
destnode = objxml.selectsinglenode ( "Newlist")
이 싱글 로노드가 "루트"가 될 수없는 우선 순위가 있습니다.
--------------------------------
XML 파일을 저장합니다
setobjxml = server.createobject ( "microsoft.xmldom")
filepath = server.mappath ( "list.xml")
objxml.save (Filepath)
--------------------------------
XML 노드를 추가하십시오
xmlnode = "..."
setobjxml = server.createobject ( "microsoft.xmldom")
objxml.loadxml (xmlnode)
newNode = objxml.documentElement
myxml. AppendChild (Newnode)
--------------------------------
항목 매개 변수
myxml.childnodes.item (2) .text
다수의 어린이의 경우 특정 노드를 가리 킵니다.
데모 주소 : http://www.xunuo.net/other/code/index.asp
다운로드 주소 : http://www.xunuo.net/other/code/leave.rar