# HTML tags in XML

**URL:** <https://forum.kirupa.com/t/html-tags-in-xml/239416>\
**Category:** Uncategorized\
**Created:** [September 21, 2007, 2:27pm UTC](https://forum.kirupa.com/t/html-tags-in-xml/239416 "2007-09-21T14:27:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esseti](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Esseti](https://forum.kirupa.com/u/Esseti)\
**Post date:** [September 21, 2007, 2:27pm UTC](https://forum.kirupa.com/t/html-tags-in-xml/239416/1 "2007-09-21T14:27:10Z")

</div>

Im trying to use HTML tags in an XML file, but not as nodeValues, I want to use HTML tags inside a node attribute string ie:

// test.xml contents  
\<?xml version=“1.0” encoding=“utf-8”?\>  
\<root\>  
\<item content=“some text that should render as \<b\>HTML\</b\>” /\>  
\</root\>

// flash AS  
var xmlLoad:XML = new XML();  
xmlLoad.ignoreWhite = true;  
xmlLoad.load(“test.xml”);  
xmlLoad.onLoad = function(success) {  
if (success) {  
trace(“loaded”);  
var xmlContent = this.firstChild.childNodes[0].attributes.content;  
testTextField.html = true;  
testTextField.htmlText = xmlContent;  
trace(xmlContent);  
} else {  
trace(“error”);  
}  
}

When the tags are in the attribute string, flash returns ‘undefined’, but when I delete them it works ok, but that’s not what I want.

And yes, I’ve tryed \<![CDATA[…]]\>, and I think it doesn’t work inside a node, or its attribute :/.
