Posted By

heathbo on 10/07/10


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

bobbym245
Demian
mgeduld


XML, string, and the missing new line issue


 / Published in: ActionScript 3
 

For some reason if you load in text from an xml file and the text has a newline character(\n or \r), the newline character doesn't create a new line but shows up in the text instead.

  1. // In your XML, change \n to \\n.
  2.  
  3. yourXMLString = yourXMLString.split("\\n").join("\n");

Report this snippet  

You need to login to post a comment.