Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

Parse XML

I've got a pretty simple question. I need to parse an xml file and get the value of "zone". Could someone show me a code example?

<messageschedule zone="zone1">
0 Kudos
1 Reply
Level 7

Re: Parse XML

That's not technically valid XML, as there's not closing tag, but assuming you actually meant there to be one...
zone = ""
xmlString = "<messageschedule zone='zone1' />"
xml = CreateObject("roXmlElement")
If xml.Parse(xmlString) Then
zone = xml@zone
End If
My Channels: - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos