<%@ Language=VBScript %> Open Source Information - Data powered by HanDBase

HOME

DVDs

KidsWare

MobileViews

Telephony

SEARCH

 
Open Source Information Powered by HanDBase & XML

<% ' 010324 - Todd Ogasawara ' Source code Copyright 2001 Todd Ogasawara function writeln(args) response.write args response.write "
" End Function function loadXML() Dim xmlDoc, objRootElement, numRecords, i Dim sRecord, sSiteURL, newSiteURL, sSiteType, sSiteDesc, sSiteNotes, sDateEntered ' Instantiate the XML Processor set xmlDoc = Server.CreateObject("Microsoft.XMLDOM") ' Have the processor validate the document xmlDoc.validateOnParse=True ' Load the XML document xmlDoc.load(Server.MapPath("./OpenSource.XML")) ' Set the document element Set objRootElement = xmlDoc.documentElement ' Force the file to load synchronously (all at once) xmlDoc.async = false numRecords = objRootElement.childnodes.length Response.Write "Number of Sites Listed = " Response.Write numRecords Response.Write "
" ' Determine if an entry is a recent one Today = Date For i = 0 to numRecords - 1 sRecord = objRootElement.childNodes(i).nodeName sSiteURL = objRootElement.childNodes(i).firstChild.text if instr(sSiteURL, "http://") = 0 then newSiteURL = "http://www." + sSiteURL else newSiteURL = sSiteURL end if sSiteType = objRootElement.childNodes(i).childNodes(1).text sSiteDesc = objRootElement.childNodes(i).childNodes(2).text sSiteNotes = objRootElement.childNodes(i).childNodes(3).text sDateEntered = objRootElement.childNodes(i).lastChild.text if DateDiff("d", sDateEntered, Today) < 31 then Response.Write "" Response.Write "New! " Response.Write sDateEntered Response.Write " " Response.Write "" end if Response.Write "" Response.Write sSiteDesc Response.Write "
" if sSiteType <> "" then Response.Write "  " Response.Write "" Response.Write sSiteType Response.Write "" Response.Write "
" end if if sSiteNotes <> "" then Response.Write "  " Response.Write sSiteNotes Response.Write "

" else Response.Write "

" end if Next ' For loop End Function %>
<% loadXML %>