Hi,
My app downloads and parses some XML that contains
...
<categoryList>
<category>Name1</category>
<category>Name2</category>
<category>Name3</category>
</categoryList>
And successfully parses down to
if posterItem.Getname() = "categoryList" then
categoryItems = posterItem.GetChildElements()
for each categoryItem in categoryItems
' CRASH: categoryItem = <UNINITIALIZED>
print categoryItem.GetName()
The problem is that when I print categoryItems from the dubugger, I get 3 valid children whose names match the expected category names. But when I try to iterate over categoryItems using for each, it always prepends three <UNINITIALIZED> values before the valid values.
Brightscript Debugger> p categoryItems
<Component: roXMLElement>
<Component: roXMLElement>
<Component: roXMLElement>
Brightscript Debugger> p foreach categoryItem in categoryItems
<UNINITIALIZED><UNINITIALIZED><UNINITIALIZED><Component: roXMLElement>
<Component: roXMLElement>
<Component: roXMLElement>
Does anyone know why that may be, and how I could fix or workaround the problem or detect the error upstream? I don't see any problem with the XML itself.