Forum Discussion

jbrave's avatar
jbrave
Channel Surfer
15 years ago

parsing XML question

I'm getting an xml feed and trying to extract some data. With tags like

<name>Joseph</name>
it works just fine.


but with With tags like:
<file-count type="Integer">30</file-count>

I get this error:

/tmp/plugin/HJAAAAREIkOr/pkg:/source/main.brs(33): runtime error ec: 'Dot' Operator attempted with invalid BrightScript Component or interface reference.

033: tcs=xml.file-count.GetText()

and:

tcs &h30 Untyped val:Uninitialized

Can anyone help? How do get the value of a tag that has subsidiary information in it like "type"? Should I declare tcs as an integer first? It doesn't seem to help. Do I need to do a test of some kind on each xml key before I attempt to assign it to a variable?

Thanks!

37 Replies