init_show_feed_item() is just creating a simple object to use in your BrightScript. It's a storage container for the data you are pulling from the XML. It doesn't actually define the XML file, you do that by altering the structure of the XML file directly, adding nodes and attributes. Note, your parse function will need to know what to expect in terms of the structure, so if you modify the XML, also modify the parse function to accomodate.
parse_show_feed() is what parses the XML files and pulls the data into the roAssociativeArray. Check the xml folder of the videoplayer example to see how the XML is structured, then follow along in the parse_show_feed function. If you want a quick shorthand: @ references an attribute, . references a child node, and GetText() returns the contents of a node. Section 4.5 of the BrightScript Reference Manual covers XML support in BrightScript.
If you wanted to add additional info for each video item, you would probably want to do that in all three places.
1. The XML File - Add additional element nodes or attributes to each <item></item>
2. The init_show_feed_item function - Add additional properties in your roAssociativeArray
3. The parse_show_feed function - Read the xml nodes or attributes from the xml file and store them your roAssociativeArray
As an example, your XML might look like this after adding a previewUrl item:
<item sdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" hdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg">
<title>Elizabeth Gilbert on nurturing creativity</title>
<contentId>10051</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://video.ted.com/talks/podcast/ElizabethGilbert_2009_480.mp4</streamUrl>
<previewUrl>http://video.ted.com/talks/podcast/ElizabethGilbert_2009_480.mp4</previewUrl>
</media>
<synopsis>Elizabeth Gilbert muses on the impossible things we expect from artists and geniuses -- and shares the radical idea that, instead of the rare person 'being' a genius, all of us 'have' a genius. It's a funny, personal and surprisingly moving talk.</synopsis>
<genres>Creativity</genres>
<runtime>1172</runtime>
</item>
Note the new previewUrl node inside the media node.
Once you have the information pulled into your roAssociative array, you'll probably have to write your own solution to determine when to play different bit rate files and preview files. Hopefully someone with more experience on the video end of things can chime in with some suggestions there.
Hope this was at least a little clarifying.
🙂