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: 
SolveLLC
Visitor

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 1
TheEndless
Channel Surfer

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: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos