I have a content managed site that I need to create an sitemap XML for. The
pages can be switched on and off by the client so the XML file needs to read
values from the db.
At the moment we are doing this in Classic ASP that uses an IF statement to
look at a BIT value in the table and display the page, see the code below,
but need a proper XML file to handle this.
Thanks in Advance
Simon Gare
www.london.chauffeurcarcompany.com
et XMLSiteMap = Server.CreateObject("ADODB.Recordset")
XMLSiteMap.ActiveConnection = MM_TobiasNET_STRING
XMLSiteMap.Source = "SELECT * FROM dbo.CMSViewWebPages WHERE CDID ="&
companyID
XMLSiteMap.CursorType = 0
XMLSiteMap.CursorLocation = 2
XMLSiteMap.LockType = 1
XMLSiteMap.Open ()
XMLSiteMap_numRows = 0
Response.Write "<?xml version=""1.0"" encoding=""UTF-8"" ?>"&VbCrlf
Response.Write "<urlset
xmlns=""http://www.google.com/schemas/sitemap/0.84"">"&vbcrlf
Response.Write "<url>"&vbcrlf
Response.Write "<loc>http://" & request.servervariables("server_name") &
"/index.asp</loc>"&vbcrlf
Response.Write "<priority>1.0</priority>"&vbcrlf
Response.Write "<changefreq>weekly</changefreq>"&vbcrlf
Response.Write "</url>"&vbcrlf
If ABS(XMLSiteMap.Fields.Item("achievements").value) = 1 Then