A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: ' in XML output

  1. #1
    Junior Member
    Join Date
    Nov 2001

    ' 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?

    Last edited by jraheem; 11-15-2002 at 10:11 PM.

  2. #2
    Junior Member
    Join Date
    Apr 2002
    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
    var testString = listItem.split("'").join("'");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center