Flash / Xml / Array / Text
- Started
- Last post
- 12 Responses
- mase
hi Can ayone help?
I've pushed some xml in to an array and I trace it....
trace(arrHeader[0]);
and it give's me the first value. Which is what I want.
but
I try to put that in a text field...
txt.text = arrHeader[0];but that don't work.
what am I doing wrong? or what am I not doing?
!?
- UndoUndo0
hard to say without seeing the xml and the as but have use you used the nodeValue property when getting the value from the node? if not it might carry the node tags with it.
- mase0
this is my array...
arrHeader.push(xmlDoc.firstChild...
and xml.....
ADVERTISING
ad blah ad blahNEWS
News blah blahSTUFF
Stuff blah blahit's all in there when I trace it
!?
- joyride0
huh? NT strips xml tags
anyone have a link to the postbin or whatever so he can post his code?
- stewart0
type it all here folks.
- mrbee28280
what do you get when you run
trace(arrHeader[0]); ? formatted text r raw text?can you set anything else to that field? it maybe something simple like targetting or using the wrong set type like text ver htmlText.
- mase0
- joyride0
are you trying to use it before the XML is parsed?
- UndoUndo0
mase try outputting to a textfield using .text and not htmlText it will show you if you have tags wrapped around the value
- joyride0
From what I see it looks fine. When/how are you using the:
txt.text = arrHeader[0]
- mase0
I put
txt.text = arrHeader[0]
at the bottom and doesn't work.I've just move it up to just after the for(){}
http://pastebin.coconut.se/?id=4…and that works ok.
what's that all about then?
- jpea0
sometimes i've found that i have to make it a string to work.
newHead = eval(arrHeader[0])
or possibly
arrHeader[0].toString()
- jonandress0
myxml.ignorewhite=true