navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

XML with ASP as RSS

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> XML with ASP as RSS
Page: [1]
 
yaronbb

 

Posts: 44
Joined: 10/5/2006
Status: offline

 
XML with ASP as RSS - 8/27/2008 20:05:49   
Hi to all,
I have trying to add a RSS page (XML) to a web site with connection to the DB(Access), this is my code below, I get an error MSG “

A name was started with an invalid character.
Line: 1 Character: 2

<% response.contentType = "text/xml" %>


thanks

<% response.contentType = "text/xml" %>
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
    
    <channel>
        <title>title</title>
        <description>description</description>
        <link>link</link>
    
        <%
   	Dim oConn, oRS, strSQL

   	Set oConn = Server.CreateObject("ADODB.Connection")
   	Set oRS = Server.CreateObject("ADODB.Recordset")

   	oConn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("fpdb/Contact.mdb")
   
   	strSQL="SELECT * FROM IcaCar"

	oRS.Open strSQL, oConn, 2, 3
	Do While Not oRS.EOF
            Dim xmlString

            oRecordSet.Open sSQLString,oConnectionObject

            While Not oRecordSet.Eof
                        xmlString = xmlString & "<item>" &_
                                                "<title><![CDATA[" & oRecordSet.Fields("title") & "]]></title>" &_
                                                "<description><![CDATA[" & oRecordSet.Fields("description") & "]]></description>" &_
                                                "<link>" & Server.URLEncode(oRecordSet.Fields("link")) & "</link>" &_
                                                "<pubDate>" & oRecordSet.Fields("date") & "</pubDate>" &_
                                                "</item>"
                        oRecordSet.MoveNext
            Wend
            oRecordSet.Close
            response.write xmlString
        %></channel></rss>

Page:   [1]

All Forums >> Web Development >> General Web Development >> XML with ASP as RSS
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts