% Option Explicit '************************************* ' Author: Shaun Brazier of Smart-Quotes Ltd ' Purpose: Weather XML usign a BBC Type Feed ' Date Modified: 3rd May 2006 '************************************* 'Lets set up an array for the Towns (This is a Database incode) 'rows,cols Dim arrTowns(7,1) arrTowns(0,0) = "3753" arrTowns(0,1) = "Newquay" arrTowns(1,0) = "1184" arrTowns(1,1) = "Bournemouth" arrTowns(2,0) = "0339" arrTowns(2,1) = "Isle of Wight" arrTowns(3,0) = "1895" arrTowns(3,1) = "Bude" arrTowns(4,0) = "3106" arrTowns(4,1) = "Plymouth" arrTowns(5,0) = "1000" arrTowns(5,1) = "Aberdeen" arrTowns(6,0) = "0287" arrTowns(6,1) = "Gold Coast Queensland-Australia" arrTowns(7,0) = "0094" arrTowns(7,1) = "Bells Beach, Victoria Australia" 'Declare Variables Dim objXML,objLst,intNoOfElements, i,objHdl,strDirectoryText, intTownSelect intTownSelect = Request.Form("TownSelect") If intTownSelect = "" Then intTownSelect = 3753 '3753 is Newquay - Our Default is Newquay 'Create the XML Object Set objXML = Server.CreateObject("Microsoft.XMLDOM") Set objLst = Server.CreateObject("Microsoft.XMLDOM") objXML.async = false objXML.setProperty "ServerHTTPRequest", true 'Put here the URL of the XML you want to reference - THis is available from the XML section of the login 'objXML.Load ("http://www.mopoke.co.uk/weather/3753.xml") Select Case intTownSelect Case 0339, 0287, 0094 objXML.Load ("http://www.mopoke.co.uk/weather/world/" & intTownSelect & ".xml") Case Else objXML.Load ("http://www.mopoke.co.uk/weather/" & intTownSelect & ".xml") End Select 'If intTownSelect = 0339 Then ' objXML.Load ("http://www.mopoke.co.uk/weather/world/" & intTownSelect & ".xml") 'Else ' objXML.Load ("http://www.mopoke.co.uk/weather/" & intTownSelect & ".xml") 'End If 'You could use MSXML Version 3 or 4 but it does depend what version you have on the server. 'Set objXML = Server.CreateObject("Msxml2.DomDocument.3.0") 'Set objLst = Server.CreateObject("Msxml2.DomDocument.3.0") 'Here you reference the ROW Element - This where we want to get our data from Set objLst = objXML.getElementsByTagName("item") intNoOfElements = objLst.length %>
| : . mens surfwear |
| : . womens surfwear |
| : . gallery men |
| : . gallery women |
| : . World Cup T |
| : . World Cup Sweat |
| : . about fukwit |
| : . fukwit agent |
| : : fukwit news |
| : . fukwit music |
| : . fukwit weather |
| : . fukwit events |
| : . your comments |
| : . contact us |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||