"jbrave" wrote:
Thanks, I read the manual section you suggested again, and I understand a little bit better now. However, I still don't understand all the aspects of that code you posted. What is the [0] about, seems like an array reference, but why is it needed when there is already the name of the tag in the parenthesis:
xml.GetNamedElement("file-count")[0].GetText()
Thanks,
Joel
The name of the method is actually GetNamedElement
s and it returns an roXMLList, so you need to get the first index of that list to get the XML element you're looking for. The safest way to do this is probably...
xmlFileCount = xml.GetNamedElements("file-count")
If xmlFileCount <> invalid And fileCount.Count() > 0 Then
fileCount = xmlFileCount[ 0 ].GetText()
End If
With that, you won't blow up if the element is missing from your XML for some reason.
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)