# New line in text field loaded from XML file

**URL:** <https://forum.kirupa.com/t/new-line-in-text-field-loaded-from-xml-file/213273>\
**Category:** flash\
**Created:** [January 18, 2007, 8:34am UTC](https://forum.kirupa.com/t/new-line-in-text-field-loaded-from-xml-file/213273 "2007-01-18T08:34:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bojan](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@Bojan](https://forum.kirupa.com/u/Bojan)\
**Post date:** [January 18, 2007, 8:34am UTC](https://forum.kirupa.com/t/new-line-in-text-field-loaded-from-xml-file/213273/1 "2007-01-18T08:34:43Z")

</div>

I don’t know am I tired of what?!?! ![](http://www.gotoandlearn.com/forum/images/smiles/icon_smile.gif)  
I have problem whit new line in txt field.

This example works:

```auto
 
var my_str:String = "This is firs line
 this is second line."; 
this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160, 120); 
first_txt.html = true; 
first_txt.multiline = true; 
first_txt.wordWrap = true; 
first_txt.condenseWhite = false; 
first_txt.htmlText = my_str;

```

but if I put this text in XML and load xml to flash, after trying to display text in “first\_txt” text field flash doesn’t render text with two lines, he doesn’t recognize “  
”.

I’ve put (\<BR\>) **\<BR\>** instead of \*\*  
\*\* and it works but I prefer to use \*\*  
\*\*.  
Anyone know how to accomplish that ?

Also is there possibility to use html tags inside XML without using substitution **\<** - **\<** or **\>** - **\>**?

Thanks for replies.  
Cheers
