belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2012
04:09 PM
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:
In your BrightScript code, read the XML elements using a 'for each' loop and Push each item into an array, 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
dew
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2012
08:29 AM
Re: VideoPlayer XML Question
Thank you belltown, that did it 😄 thank you again for all of your help.
Cheers
DEW
Cheers
DEW
- « Previous
-
- 1
- 2
- Next »