This content has been marked as final. Show 4 replies
Its OS dependent. The XML was probably created in a windows editor.
Windows standard is two characters for a line break. Carriage return+LineFeed.
That's not the same as other OSes which use one (either CR or LF).
Flash seems to use either CR or LF to make a line break.
You can filter them like this
if myNode represents one of your myData nodes...
var stringVal = myNode.firstChild.nodeValue; //text node value
stringVal = stringVal.split("\r\n").join("\r");
actually that was as2 so you might need to translate it for the XML stuff for as3, can't remember the differences off hand.
Was wondering why it wasn't working... I am VERY new to AS3 - like a few days, so I am not sure of the translation. I'll work it though. Thanks a lot.
no problem. Looks like it will be next week for me to really put in a solid start with as3 now. I had a play with the as3 xml a few months back to compare with as2 and it absolutely rocks.. I just can't remember the details now.