Hi, I have some experience with parsing scripts I have used in the past.
What I learned is that if I want to use a script multiple times on one
page then I must rewrite the script (manually) and upload it just as
many times as it will be used, so that things like "strItemTitle"
becomes "strItemTitle01", "strItemTitle02", "strItemTitle03" in order
for the parsing not to collide with the other parsings.
For a project I am working on I would like not to add the parse script
multiple times, but just one time, dynamically.
As far as the values that would get used in the String names, I have
done the following.
extURL = "http://rss.cnn.com/rss/cnn_topstories.rss"
StrippedExtUrl = replace(replace(replace(extURL, "http://", ""), ".", ""), "/", "")
The StrippedExtUrl is the part I want to add to the values in order
to make them dynamic, so strItemTitle should become:
strItemTitlersscnncomrsscnn_topstoriesrss
This way, the value for the url to the feed is used to dynamically
change the names for the different strings and prevent them from
clashing when loaded all at once on one page.
However, here's where I'm stuck:
for each entry in channelNodes
if entry.tagName = "title" then
strChannelTitle = entry.text
elseif entry.tagName = "description" then
strChannelDescription = entry.text
elseif entry.tagName = "link" then
strChannelLink"" & StrippedExtUrl & "" = entry.text
end if
next
I have tried things like:
strChannelTitle"" & StrippedExtUrl & "" = entry.text
(added and removed quotation marks etc. etc.) all to no avail.
Anybody know how to do this the correct way?
Greets & thanks, Dominic