<% ' find xml file path dim strFilename,strXMLFile strFilename = "subscribers.xml" strXMLFile=server.mapPath(strFilename) ' standard "create xml object" code set XML = server.createObject("Microsoft.XMLDOM") XML.async=false ' check file exists bitFileExists = XML.load(strXMLFile) if bitFileExists then tmpChildnodes = XML.documentElement.childnodes.length - 1 intCurrentRecord = tmpChildnodes + 1 else ' create xml XML.appendChild(XML.createProcessingInstruction("xml","version=""1.0""")) XML.appendChild(XML.createElement("subscribers")) intCurrentRecord = 0 end if 'SQL = "SELECT * FROM subscriber_tbl;" 'call openConn ("nothingtoit_7051") 'call openRS(SQL) 'while not rs.eof ' create record set XMLRec = XML.createElement("subscriber") 'Create an id attribute Set Att = XML.createAttribute("id") Att.Text = intCurrentRecord XMLRec.setAttributeNode Att ' set remaining fields ' name XMLRec.appendChild(XML.createElement("name")) XMLRec.childnodes(0).text = request("name")'rs("subscriber_email")'request.form("name") ' email address XMLRec.appendChild(XML.createElement("email")) XMLRec.childnodes(1).text = request("email") 'rs("subscriber_zip")'request.Form("email") ' date stamp XMLRec.appendChild(XML.createElement("created")) XMLRec.childnodes(2).text = now() ' write new record XML.documentElement.appendChild(XMLRec.cloneNode(true)) rs.movenext 'wend 'call rsclose 'call cleanup ' save file XML.save strXMLFile ' redirect to xml file response.redirect(strFilename) XML = nothing %>