Error getting info from xml downloaded

Hi!

I’m using the XML.lua module to display information from a xml downloaded with network.download

The download process was OK and saved the network file to temporary directory correctly.

The structure of XML it’s the same of this:

[blockcode]

<?xml version="1.0" encoding="UTF-8"?>



LINK
TITLE

TITLE

LINKIMAGE
DESC
LANG


LINK
LINK COMMENTS
DATE
LINK





[...]
[/blockcode]
Some lines of my app code:

[lua] local calendari = xml:loadFile("test.xml", system.TemporaryDirectory);

for i=1,#calendari.child do
contingut[i] = calendari.child[i]
end

for i=1,#contingut do
local cont = contingut[i].child[1].value
txtAgenda[i] = display.newText("Contingut: " ..cont, 0, base*5, nil, 30)[/lua]

I modify this line to see what type of information it will display:
[lua]local cont = contingut[i].child[X].value[/lua]

On "X" if I put:
1: Displays line 4 from XML code
2: Displays line 5 from XML code
3: Runtime ERROR: attempt to concatenate local 'cont' < a nil value > (in line 9 of Lua code of this post)
4: Displays line 7 from XML code
5: Displays line 8 from XML code
6: Runtime ERROR: attempt to concatenate local 'cont' < a nil value > (in line 9 of Lua code of this post)
7: Runtime ERROR: attempt to concatenate local 'cont' < a nil value > (in line 9 of Lua code of this post)
8: Runtime ERROR: attempt to concatenate local 'cont' < a nil value > (in line 9 of Lua code of this post)

I'm interesting to start to display the line 10 of XML code, I would display every ITEM's tag content of XML, but I don't know why didn't display making an error that can't concatenate the information.

Maybe the problem is on CDATA ?

I tried to modify XML.lua module adding some lines in "XmlParser:ToXmlString" function:

[lua]function XmlParser:ToXmlString(value)
value = string.gsub (value, " ", "value = string.gsub (value, " ", "]]>");
[...][/lua]

But didn't work...

Anybody can help me?

Thanks!
Gracias! ;)

(sorry for my bad english!)
[import]uid: 93601 topic_id: 17544 reply_id: 317544[/import]

I see that the problem is here

[blockcode]
LINK
TITLE

TITLE

LINKIMAGE
DESC
LANG
[/blockcode]

If I delete this part (also [blockcode][/blockcode]) I can see the content correctly that I would like to display in my app device, but the online RSS file won't display correctly in webpage.

How I can “jump” this zone of XML to start in ITEM tag??

Thanks!
Gracias! [import]uid: 93601 topic_id: 17544 reply_id: 66681[/import]

check you syntax I beleive it is not valid, download xml here, www.liquid-technologies.com/Download.aspx 
thanks [import]uid: 103565 topic_id: 17544 reply_id: 66971[/import]

I don’t get your error but I use your code

for i=1,#data do  
 txtAgenda[i] = display.newText("Contingut: " ..data[i].child[1].value, \_H/2 - 200, \_W/2 \*i, nil, 20)  
 end  

and works fine for me =S

and my XML is:

<inbox language="EN" color="orange"><br>?<br><message><br><dia>9</dia><br><mes>11</mes><br></message><br></inbox> [import]uid: 23063 topic_id: 17544 reply_id: 66979[/import]