1

I've followed ET documentation regarding pulling data from RSS feed to email that can be found here:

http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/how_to_include_an_rss_feed_in_an_email_message_using_ampscript/

I've created simple code:

%%[
SET @xmlTemp = ContentAreaByName("my contents\XML\XMLtest")
SET @xml = Replace(@xmlTemp, "content:encoded", "contentencoded")
SET @titles = BuildRowsetFromXML(@xml,"//item/title",1)
]%%

%%=Field(Row(@titles, 1), 'Value')=%%

It works fine when it's implemented in landing page but generates error when it's used in email. I tried to wrap output into TreatAsContent() but still nothing

3
  • Mateusz, can you provide RSS feed details? Also maybe extra bracket in your code %%=Field(Row(@titles, 1), 'Value')=%% but not sure that is the issue.
    – Palash Rai
    Commented Nov 12, 2015 at 12:09
  • Hey sure, feedforall.com/sample.xml Commented Nov 12, 2015 at 12:15
  • And You are right, there was an additional bracket but I removed it and I still can't make it to work Commented Nov 12, 2015 at 12:23

1 Answer 1

1

You have to check RowCount of title before returning the field value.

   %%[
    SET @xmlTemp = ContentAreaByName("my contents\XML\XMLtest")
    SET @xml = Replace(@xmlTemp, "content:encoded", "contentencoded")
    SET @titles = BuildRowsetFromXML(@xml,"//item/title",1)
        If RowCount(@titles) > 0 Then
    ]%%
         %%=Field(Row(@titles, 1), 'Value')=%%
    %%[EndIf]%%

Output RSS Solutions for Restaurants

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .