I have an rss-feed problem that I wonder if you could help me with.
How do I check - with ampscript in an email - if a node exists in an item or not? If one of the node exists that will be used to populate parts of the email ELSE the other node/nodes will be used.
Structure of RSS feed is like this
<items> <item> <title>Movietitle</title> <prodyear><1976</prodyear> </item> <item> <title>Seriestitle</title> <season>3</season> <episode>147</episode> </item> </items>
So sometimes there is a production year (= movie) and sometimes there is season/eposide number (= series)
I need to populate an email based on this. I have a lot of other items and all works fine except for this.
Based on this code:
%%[ Set @bottom1_prodyears = BuildRowsetFromXML(@xml_bott,"//item/prodyear",1) Set @bottom1_epis = BuildRowsetFromXML(@xml_bott,"//item/episodenumber",1) Set @bottom1_seas = BuildRowsetFromXML(@xml_bott,"//item/season",1) if (@bottom1_prodyears == "") OR (isNull(@bottom1_prodyears)) then Set @bottom1_epi = Field(Row(@bottom1_epis,1), "Value") Set @bottom1_sea = Field(Row(@bottom1_seas,1), "Value") else then set @bottom1_prodyear = Field(Row(@bottom1_prodyears,1), "Value") endif ]%%
But how ever I do this, I end up with it being a series. So question is: How do I check - with ampscript - if a node exists in an item or not?
Thanks a lot in advance for any hint. Best regards /Tove Walden