-
' in XML output
I'm loading an XML document into a listbox (listbox component) in Flash MX. The ' and & characters show up as ' and &
I know you can set a textfield to HTML rendering but there's no way I can see with a ListBox to designate the field to allow HTML rendering. Would I have to write a search and replace subrountine when I read the XML node and then set the listbox item to it?
Thanks
J.
Last edited by jraheem; 11-15-2002 at 10:11 PM.
-
hopefully you'll get this message since I to have been having trouble with this problem for the LONGEST TIME!
here's the solution:
//first load the text node into a variable.
var listItem = someXMLdocument.firstChild.blah.blah;
//using the string.split method, we delete all occurences of
//the beloved '.... then we quickly join the array into a
//string.
var testString = listItem.split("'").join("'");
trace(testString);
yourListBox.addItem(testString);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|