
hugetv
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2015
09:59 AM
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
<?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
2 REPLIES 2
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2015
01:44 PM
Re: read config.opml file
Assuming you've read the XML into a string called xml:
-JT
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.
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.

hugetv
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2015
05:45 PM
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