Skip to main content
Inspiring
August 20, 2008
Question

Create RSS

  • August 20, 2008
  • 1 reply
  • 458 views
I am trying to create a feed of events pulled from our query.

I found the following example:

<cfscript>
myStruct = StructNew();
mystruct.link = " http://www.garyrgilbert.com/tutorials/coldfusion/advanced/index.cfm?tutorial=";
myStruct.title = "Gary Gilbert's Advanced Coldfusion Tutorials";
mystruct.description = "Coldfusion Tutorials from beginner to Advanced";
mystruct.pubDate = Now();
mystruct.version = "rss_2.0";

<!--- Map the orders column names to the feed query column names. --->
columnMapStruct = StructNew();
columnMapStruct.publisheddate = "createDate";
columnMapStruct.content = "body";
columnMapStruct.title = "title";
columnMapStruct.rsslink = "ID";
</cfscript>
<cffeed action = "create"
query= "#getAdvancedCf#"
meta="#mystruct#"
columnMap="#columnMapStruct#"
outputFile = "AdvancedTutorialsFeed.xml"
overwrite = "yes"
xmlVar = "myXML">

And have replaced what I thought was the appropriate info, for example, I
have changed the columnMapStruct.publisheddate="query.itemdate" where query
is my query (duh!)

I changed the query="#getAdvancedCf#" to my query name as well.

When I run this though, I keep getting a:

Context validation error for the cfscript tag.
The start tag must have a matching end tag. An explicit end tag can be provided
by adding </cfscript>. If the body of the tag is empty, you can use the shortcut
<cfscript .../>.
The CFML compiler was processing:

A cfscript tag beginning on line 11, column 2.

What am I doing wrong????



    This topic has been closed for replies.

    1 reply

    Inspiring
    August 20, 2008
    You have a CFML-style comment in the middle of your CFScript block.

    Usually when you get that error, keep an eye out for a stray CFML
    statement, comment, or angle bracket.

    --
    Adam
    Inspiring
    August 20, 2008
    Hello Adam,

    Ok, how about this one?

    Attribute validation error for the CFFEED tag.

    I have the <cffeed> tag set up as:
    <cffeed action="create"
    query="#TournamentList#"
    columnMap="#columnMapStruct#"
    outputFile="AdvancedTutorialsFeed.xml"
    overwrite="yes"
    xmlVar="myXML">


    > You have a CFML-style comment in the middle of your CFScript block.
    >
    > Usually when you get that error, keep an eye out for a stray CFML
    > statement, comment, or angle bracket.
    >