Here is the function that I am using to retrieve the XML via HTTP, parsing the XML, and creating a list of objects. The XML parsing is
NOT the issue here, as I am printing out all the correct values.
The issue has something to do with setting SDPosterUrl to the image path parsed from the XML. If I print out the image values, and set SDPosterUrl to one of those values, then the image displays, which does not make sense to me. The parsed image path is a String type, just like when I set SDPosterUrl to a literal string value.
I do not receive any bad path errors or anything, the screen just displays loading for the image. It just doesn't make any sense to me.
Function getShowsForCategoryItem(category As Object) As Object
print "getting shows for category "; category
url = "http://somePath?channel=" + category + "&type=live&format=xml"
http = CreateObject("roUrlTransfer")
http.SetUrl(url)
data = http.GetToString()
xml=CreateObject("roXMLElement")
xml.Parse(data)
events = xml.events.event
Dim list[20]
for each event in events
eventObj = CreateObject("roAssociativeArray")
eventObj.ShortDescriptionLine1 = event.startTime.gettext()
eventObj.ShortDescriptionLine2 = event.showName.gettext()
stream = CreateObject("roAssociativeArray")
stream.url = event.videoURL.gettext()
stream.quality = "SD"
image = event.images.small.gettext()
print(image)
eventObj.SDPosterUrl = image
eventObj.Stream = stream
list.Push(eventObj)
end for
return list
End Function