Forum Discussion

brucerothwell's avatar
14 years ago

Reading An HTML File with ReadAsciiFile?

I'm using the MRSS template.
In the main.brs, I have changed the line that uses ReadAsciiFile to read the config.opml from a URL location, thusly:


raw = roURLTransfer("http://www.clearperception.org/wordchannel/config.opml")


However, the file does not seem to be getting read, as the channel will not play in Roku.

The config.opml does exist at that URL location, though.

So, my question is this: How can I make this work, so the config.opml file does not have to be part of the package?

(NOTE: I have also experimented with the videoplayer example, and can point to a URL location for the category.xml file just fine)

Thx!

-
Bruce

3 Replies

  • renojim's avatar
    renojim
    Community Streaming Expert
    xfer = CreateObject("roUrlTransfer")
    xfer.SetUrl("http://www.clearperception.org/wordchannel/config.opml")
    raw = xfer.GetToString()

    It's all in the documentation for roUrlTransfer.

    -JT
  • JT,

    Thanks for the example code.

    Ya know, it is odd that I searched on "("http:" in the Brightscript PDF file that came with the SDK and never found anything.
    Is this kind of thing documented in a different PDF file?

    -
    Bruce
  • renojim's avatar
    renojim
    Community Streaming Expert
    You want to be looking at the Component Reference. The BrightScript reference mostly just has language elements.

    -JT