# Dynamic XML text

**URL:** <https://forum.kirupa.com/t/dynamic-xml-text/262294>\
**Category:** Uncategorized\
**Created:** [June 4, 2008, 6:32pm UTC](https://forum.kirupa.com/t/dynamic-xml-text/262294 "2008-06-04T18:32:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stupidsaint](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@stupidsaint](https://forum.kirupa.com/u/stupidsaint)\
**Post date:** [June 4, 2008, 6:32pm UTC](https://forum.kirupa.com/t/dynamic-xml-text/262294/1 "2008-06-04T18:32:07Z")

</div>

I have a text field that i have set to load several lines of text from an XML file.

```auto

<?xml version="1.0" encoding="uft-8"?>

<imageText>
    <text>
        <text1>text for image one <br> line 1 <br> line 2 <br> line 3</text1>
    </text>
</imageText>

```

it loads into flash fine but when i try make it a global variable it only takes the “text for image one” because it thinks the   
's are tags. flash the turns the above code into:

```auto

<?xml version="1.0" encoding="uft-8"?><imageText><text><text1>text for image one <br> line 1 <br> line 2 <br> line 3</br></br></br></text1></text></imageText>

```

i need this tag to be in there to show that its a new line. is there another way to do this?

Thanks  
Stupid Saint

---

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [June 4, 2008, 6:53pm UTC](https://forum.kirupa.com/t/dynamic-xml-text/262294/2 "2008-06-04T18:53:58Z")

</div>

search kirupa for “xml CDATA” tags - CDATA tags allow the parser to, in short, “ignore” tags within a node:

\<text1\>\<![CDATA[text for image one \<br\> line 1 \<br\> line 2 \<br\> line 3]]\>\</text1\>

you’ll, of course have to make sure your textField.html = true and set text via textField.htmlText = itemfromxml;

hope this helps

---

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [June 5, 2008, 6:23pm UTC](https://forum.kirupa.com/t/dynamic-xml-text/262294/3 "2008-06-05T18:23:35Z")

</div>

glad to help 🍺
