# XML - \<!\[CDATA\[ enclosed HTML tags appearing on output

**URL:** <https://forum.kirupa.com/t/xml-cdata-enclosed-html-tags-appearing-on-output/186954>\
**Category:** flash\
**Created:** [April 25, 2006, 3:59pm UTC](https://forum.kirupa.com/t/xml-cdata-enclosed-html-tags-appearing-on-output/186954 "2006-04-25T15:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapstan](https://avatars.discourse-cdn.com/v4/letter/k/d26b3c/32.png) [@kapstan](https://forum.kirupa.com/u/kapstan)\
**Post date:** [April 25, 2006, 3:59pm UTC](https://forum.kirupa.com/t/xml-cdata-enclosed-html-tags-appearing-on-output/186954/1 "2006-04-25T15:59:02Z")

</div>

Hi,  
I’m having some trouble getting HTML tags to be parsed and not appear when displaying them in a dynamic text field;

here is the actionscript i’m using to display the data:

var XMLDoc:XML = new XML();

XMLDoc.ignoreWhite = true;  
XMLDoc.onLoad = processXML;  
XMLDoc.load (“XML/copy.xml”);

function processXML(success:Boolean):Void {  
if (success) {  
trace (“Success”);  
\_level0.txt\_Headline.htmlText = XMLDoc.firstChild.firstChild.childNodes[1].attributes.headline;  
\_level0.txt\_Body.htmlText = XMLDoc.firstChild.firstChild.childNodes[1].childNodes[0].firstChild;  
} else {  
trace (“Error.”);  
}  
}

here is the XML that im pulling out:  
\<subnav name = “Overview” headline = “WHO WE ARE”\>  
\<body\>\<![CDATA[\<p\>Next to our reputation, our greatest asset is our people. Design Forum’s team includes designers, strategists, brand experts, architects, engineers, implementation specialists, store planners, researchers and dozens of behind-the-scenes people who make it all happen.\</p\>\<p\>We work with clients across all categories, including: retail, automotive, financial services, restaurants, as well as consumer products manufacturers.\</p\>\<p\>The barn-inspired corporate headquarters is a paradigm of Design Forum’s approach and a symbol of our Midwestern work ethic. Built on the site of an old Ohio farm, its open spaces nourish a creative culture.\</p\>]]\>\</body\>  
\</subnav\>

can’t figure out why the \<p\>\</p\> tags are appearing and not being parsed.

what am i doing wrong?

thanks for any help.  
ian

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [April 26, 2006, 5:09am UTC](https://forum.kirupa.com/t/xml-cdata-enclosed-html-tags-appearing-on-output/186954/2 "2006-04-26T05:09:46Z")

</div>

You have to set the _html_ property of each text field to true.
