I'm trying to pull the hero images for a new blog published each time and use RSS to create the content in the email. At this time all the content gets pulled in instead of the image. Can you please help what I should do it get this result. Any help will be appreciated. My code is below.
Thank you!
<div padding:="" 15px="" 15px;="">
%%[
var @xml, @isXML, @nodes, @rowCount @i, @maxToDisplay,
Set @xml = HTTPGet("https://feeds.feedburner.com/Sonar", false, 0, @CallStatus)
if indexOf(@xml,"<channel>") > 0 then
set @nodes = BuildRowsetFromXML(@xml,"/rss/channel/item",0)
set @rowCount = rowcount(@nodes)
if @rowCount > 0 then
for @i = 1 to 1 do
var @title
var @description
var @link
var @Image
set @nodepath = concat("/rss/channel/item[",@i,"]/")
if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"title"))) > 0 then
set @title = Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"title"),0),1),'Value')
endif
if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"description"))) > 0 then
set @description = Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"description"),0),1),'Value')
endif
if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"link"))) > 0 then
set @link = Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"link"),0),1),'Value')
endif
if rowcount(BuildRowsetFromXML(@xml,concat("//item[",@i,"]/image"),0)) > 0 then
set @image = Field(Row(BuildRowsetFromXML(@xml,concat("//item[",@i,"]/image"),0),1),'Value')
endif
]%%
<h4>%%=v(@title)=%%</h4>
<br>
<img src="%%=v(@Image)=%%">
%%=v(@description)=%%
<br>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<center>
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="%%=redirectto(@link)=%%" style="height:53px;v-text-anchor:middle;width:150px;" arcsize="8%" stroke="f" fillcolor="#c72b28">
<w:anchorlock/>
<center>
<![endif]-->
<a href="%%=redirectto(@link)=%%" style="background-color:#c72b28;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:53px;text-align:center;text-decoration:none;width:150px;-webkit-text-size-adjust:none;">Read Now</a>
<!--[if mso]>
</center>
</v:roundrect>
<![endif]--></div>
</center><table class="button" width="30%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
</tr>
</table></td></tr></table>
<br>
%%[
next @i
else
outputline(concat("<br>no items found"))
endif
else
outputline(concat("<br>no XML found"))
endif
]%%
</div>