# Getting HTML text from XML file

**URL:** <https://forum.kirupa.com/t/getting-html-text-from-xml-file/104362>\
**Category:** Uncategorized\
**Created:** [March 15, 2004, 2:22pm UTC](https://forum.kirupa.com/t/getting-html-text-from-xml-file/104362 "2004-03-15T14:22:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AXiAL](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@AXiAL](https://forum.kirupa.com/u/AXiAL)\
**Post date:** [March 15, 2004, 2:22pm UTC](https://forum.kirupa.com/t/getting-html-text-from-xml-file/104362/1 "2004-03-15T14:22:08Z")

</div>

I am loading an XML file into a dynamic textfield in flash.

Is it possible to load in HTML text from the XML file… If so how??

my XML file looks like this

```auto
<?xml version="1.0" encoding="iso-8859-1"?>
<news>
	<entry
		date="10th Feb, 2004"
		description="First Version of site. Still Working Refining."
	/>
	<entry
		date="10th Feb, 2004"
		description="check out <a href='http://www.xotyx.com/'> Xotyx.com</a>"
	/>
</news>

```

Flash reads in the XML but doesnt display the second entry… So the code is not right… Here is the AS…

[AS]  
// reading in XML…  
var news = new XML();  
news.ignoreWhite = true;  
var entry = 0;  
var total = 0;  
var current = 0;

news.load(“news.xml”);  
news.onLoad = function(success) {  
\_root.total = this.firstChild.childNodes.length;  
if (success) {  
\_root.entry = \_root.total - 1;  
for (i=\_root.total; i \> 0; i–)  
{  
date\_txt = this.firstChild.childNodes[\_root.entry].attributes.date;  
description\_txt = this.firstChild.childNodes[\_root.entry].attributes.description;

scrollerTxt = scrollerTxt + date\_txt + "  
" + description\_txt + "

";  
\_root.entry–;  
}  
//newTxt is the instance name of they dynmic textfield.  
newsTxt.htmlText = scrollerTxt;  
}  
};  
[/AS]
