Newline in XML

Actionscript3 Add comments

Actionscript 3 + Flex Builder 2 + Adobe Flash 9 Public Alpha

Today I had a problem reading a string from a XML file that had a ‘\n’ (newline) in it. The workaround that worked was to use html entities to represent the newline, e.g. :

<f1 value="Hello!&#10;Welcome to&#10;this application" />

and then use the .htmlText property for the TextField:

textfield.htmlText = string;

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in