title: Brightsign, how to write a custom parser
body: <p>I am trying to write a custom parser for the XD1030 Brightsign player. This is the the only sample code that I got. I think it works, but as it doesn't output anything anywhere I can't really tell.</p>
  
  <pre><code>Sub rss(xmlFileName$ as String, itemsByIndex as object, itemsByTitle as Object, userVariables As Object)
  
    xml = CreateObject("roXMLElement") 
    if not xml.Parse(ReadAsciiFile(xmlFileName$)) then 
        print "xml read failed" 
    else 
        if type(xml.channel.item) = "roXMLList" then 
            index% = 0 
  
            for each itemXML in xml.channel.item 
                itemsByIndex.push(stri(index%) + " - " + itemXML.description.GetText())
                index% = index% + 1
            next 
        endif 
    endif 
  end Sub
  </code></pre>
  
  <p>The documentation is lacking and the debugging possibilities are not that great either. I have managed to create a file on the SD-card and written log messages to it, but as soon as the player tries to run invalid code it either stop executing the code or starts to flash the red error LED (which means that I have to reconfigure the player).</p>
  
  <p>What I am really after is a very small custom parser that actually does something, i.e. takes an RSS feed, does something to it and displays it on the screen. Just something so that I have something to go on.</p>
  
  <p>The end goal is to parse a more complex XML feed that contains images and videos which should be displayed as a kind of slide show, the feed should be able to contain parameters that the script uses to set user variables specified in the presentation.</p>