Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hugetv
Visitor

read config.opml file

this file config.opml

<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="1.0">
<categories
backgroundColor="#444444"
leftBreadcrumbColor="#00EE00"
rightBreadcrumbColor="#0000EE"
posterScreenTitleColor="#EE00C3"
posterScreenSubtitleColor="#00EE00"
posterScreenSynopsisColor="#EEEEEE"
springboardScreenTitleColor="#00EE00"
springboardScreenSynopsisColor="#EEEEEE"
springboardScreenActorColor="#EEEE00"
springboardScreenDirectorColor="#EEEE00"
springboardScreenDateColor="#EEEE00" StartupScreen="1">
<category title="LDS Media Library on USB" subtitle="" url="ext1:/medialibrary_downloaded.xml" showAsList="0" showAsPortrait="0" img="http://192.99.193.252/r/movie_large.png" />
<category title="LDS Media Library - Recent" subtitle="" url="" showAsList="2" showAsPortrait="0">
<category title="English - 4/12/15" subtitle="" url="pkg:/xml/medialibrary_recent_English_20150412.xml" showAsList="0" showAsPortrait="0" />
<category title="English - 4/5/15" subtitle="" url="pkg:/xml/medialibrary_recent_English_20150405.xml" showAsList="0" showAsPortrait="0" />
<category title="English - 3/29/15" subtitle="" url="pkg:/xml/medialibrary_recent_English_20150329.xml" showAsList="0" showAsPortrait="0" />
</category>

</categories>
</opml>
as to obtain the result marked in red
Our system http://www.rokumanager.com
0 Kudos
2 REPLIES 2
renojim
Community Streaming Expert

Re: read config.opml file

Assuming you've read the XML into a string called xml:
xmlel = CreateObject("roXmlElement")
xmlel.Parse(xml) 'should really check the return value to see if it parsed correctly
print xmlel.categories@startupscreen

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
hugetv
Visitor

Re: read config.opml file

good

	raw = ReadASCIIFile("pkg:/config.opml")
opml = CreateObject("roXMLElement")
opml.Parse(raw)
print opml.categories@StartupScreen
Our system http://www.rokumanager.com
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.