for row = 0 to settings.numGridRows - 1
channel = xml.Channel [channelIndex]
'print"channel------------>"channel
'nameElements = channel.getNamedElements("display-name")
nameElements = channel.getNamedElements("id")
print"id------------->"nameElements
name = nameElements.gettext()
print"id--------->"name
<channel id="I4.28458309.microsoft.com">
<display-name>4 WUNC</display-name>
<display-name>4</display-name>
<display-name>WUNC</display-name>
<display-name>PBS Affiliate</display-name>
</channel>
How to print id in channel
........................................................................................................
for programIndex = 0 to xml.programme.Count () - 1
program = xml.programme [programIndex]
nameElements = program.getNamedElements("channel")
print"channel------------->"nameElements
name = nameElements.gettext()
print"channel--------->"name
<programme start="20150331113000 -0400" stop="20150331120000 -0400" channel="I4.28458309.microsoft.com">
how to print channel in programme
How to print these data using roXmlElement interfaces
my console shows this when a run this code in my app this shows on console
id-------------><Component: roXMLList> =
(
)
id--------->
id-------------><Component: roXMLList> =
(
)
id--------->
id-------------><Component: roXMLList> =
(
)
id--------->
id-------------><Component: roXMLList> =
(
)
id--------->
id-------------><Component: roXMLList> =
(
)
id--------->
id-------------><Component: roXMLList> =
(
)
after press * from Roku remote
channel--------->
channel-------------><Component: roXMLList> =
(
)
channel--------->
channel-------------><Component: roXMLList> =
(
)
channel--------->
channel-------------><Component: roXMLList> =
(
)
channel--------->
channel-------------><Component: roXMLList> =
(
)
channel--------->
channel-------------><Component: roXMLList> =
(
)
channel--------->
channel-------------><Component: roXMLList> =
(
)
Original XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">
<tv source-info-name="Zap2it" generator-info-name="mc2xml" generator-info-url="mailto:mc2xml@gmail.com">
<TimeInfo>
<StartTimeUTC>2017-01-11T00:00:00Z</StartTimeUTC>
<EndTimeUTC>2017-01-11T03:00:00Z</EndTimeUTC>
</TimeInfo>
<channel id="I4.28458309.microsoft.com">
<display-name>4 WUNC</display-name>
<display-name>4</display-name>
<display-name>WUNC</display-name>
<display-name>PBS Affiliate</display-name>
</channel>
<programme start="20150331113000 -0400" stop="20150331120000 -0400" channel="I4.28458309.microsoft.com">
<title lang="en">Dinosaur Train</title>
<sub-title lang="en">Dinos A to Z, Part 3, Classification; Dinos A to Z, Part 4, A to Z Picnic</sub-title>
<desc lang="en">Don organizes the dinosaurs by species, features and size; all 26 dinosaurs enjoy a picnic where Tiny leads them all in the ``Dinosaurs A to Z'' song.</desc>
<credits>
<actor>Lee Tockar</actor>
<actor>Chantal Strand</actor>
</credits>
<date>20120517</date>
<category lang="en">Children</category>
<category lang="en">Comedy</category>
<category lang="en">Educational</category>
<category lang="en">Episodic</category>
<category lang="en">Kids</category>
<category lang="en">Series</category>
<episode-num system="onscreen">216</episode-num>
<episode-num system="ms_progid">1.EP011702490174</episode-num>
<episode-num system="dd_progid">EP01170249.0174</episode-num>
<audio>
<stereo>stereo</stereo>
</audio>
<previously-shown start="20120517000000" />
<subtitles type="teletext" />
<rating system="VCHIP">
<value>TV-Y</value>
</rating>
</programme>
</tv>