Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
belltown
Roku Guru

Re: VideoPlayer XML Question

For actors and categories, etc., i.e. any field that can appear more than once, do not use a separate XML element name for each one, use the same element repeated as many times as necessary, e.g:


<category>Drama</category>
<category>Romance</category>
<category>Mystery</category>
<actor>Sylvia Sidney</actor>
<actor>Oskar Homolka</actor>
<actor>Desmond Tester</actor>


In your BrightScript code, read the XML elements using a 'for each' loop and Push each item into an array, e.g:


item.Actors = [] ' Create an array of actors
for each actor in curShow.actor
item.Actors.Push (validStr (actor.GetText ()))
end for

item.Categories = [] ' Create an array of categories
for each category in curShow.category
item.Categories.Push (validStr (category.GetText ()))
end for
Tags (1)
0 Kudos
dew
Visitor

Re: VideoPlayer XML Question

Thank you belltown, that did it 😄 thank you again for all of your help.
Cheers
DEW
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!