You need to sign in to do that
Don't have an account?
Murilo Garcez
How make my ampscript read the xml link ?
I have a code that Parse the XML, using the BuildRowsetFromXML, so, I would like to put the link(of my XML) in my code to the code read the content inside of the link(XML) and then execute the code( to parse the content) and later show me the result in my web page
I tried to put the httpget(xml link), but did not worked
Follow what i tried
-
%%[ var @xml, @isXML, @nodes, @rowCount set @xml =HTTPGet("https://XMLlink") if indexOf(@xml,"<item>") > 0 then set @nodes = BuildRowsetFromXML(@xml,"/item",0) set @rowCount = rowcount(@nodes) if @rowCount > 0 then var @title var @price var @id set @nodepath = concat("/channel/item[",@i,"]/") if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"id"))) > 0 then set @id = Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"id"),0),1),'Value') endif if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"price"))) > 0 then set @price = Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"price"),0),1),'Value') endif if rowcount(BuildRowsetFromXML(@xml,concat(@nodepath,"title"))) > 0 then set @title= Field(Row(BuildRowsetFromXML(@xml,concat(@nodepath,"title"),0),1),'Value') endif if not empty(@title)) then ]%% <p> (%%=v(@price)=%%) <br> (%%=v(@id)=%%) <br> (%%=v(@title)=%%) </p>
You can reach out to Success - Salesforce Marketing Cloud page on https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001pQ5CAI for inputs on your ask.
If this information helps, please mark the answer as best. Thank you