flash xml cdata
- Started
- Last post
- 6 Responses
- PonyBoy
I've been trying forever to get flash to parse a peice of xml with cdata in some of the tags so I can read the text as 'html' when brought into flash...
... I've got EVERYTHING set correctly... according to all the info I can find on the web... but I still get html tags in my text... it's not rendering the html...
my textfield has the fonts embedded... is set to read html (both dynamically and via the properties panel), I use 'myText.htmlText ='...
... now... if I kill the CDATA tags... it will render... sort of...
... but when I loop through the xml nodes to populate data - if I kill the CDATA tags, only one mc will populate... the following ones won't. If I keep the CDATA... all the mc's populate, but the text in the CDATA portion is rendered in html formatting language...
... so damned frustrating... anyone have any suggestions?
- PonyBoy0
woah!
got it... been at this for about two days...
(the following won't parse the node correctly... the second line has the additional necessary script ... if anyone's interested!)
Renders text w/html format visible:
var story = news_xml.firstChild.childNodes[i...Renders the same node but w/proper html formatting.
var story = news_xml.firstChild.childNodes[i...
- kyl30
gotsta love those nodevalues
- 67nj0
hey! do you have some links to look at for this stuff? i'm finishing right now a graphic flash interface for an application that reads and writes into an xml document...
i'll need some help...
- PonyBoy0
well... so far I think I've got retrieving information down... now I need to learn to add data...
... this is a really nice breakdown of flash and xml:
- caseyc0
Not sure why, but I've always had a problem with CDATA, meaning I just dont like using it. I do this instead, all while making sure the (x)html text is well formed of course...
myHtmlTextNode.childNodes.join...
- clint0
CDATA is the way to go though if you want special char sets for different languages and html tags in your content.- Done it many times and works fine, but aknowledged, it was a real headf*ck into the early morning hours the first time around.