Forum Discussion
RokuChris
15 years agoRoku Employee
Handling XML in BrightScript is much easier than JSON, but either is possible. Take a look at the documentation for roXMLElement. Some very simple XML parsing logic might look like this:
showList = []
xml = CreateObject("roXMLElement")
if xml.Parse(xmlString) ' where xmlString is a chunk of valid XML you've fetched from some cloud service
for each item in xml.item
showList.Push({
title: item.title.GetText()
sdPosterURL: item.image.GetText()
hdPosterURL: item.image.GetText()
' etc...
})
next
end if