# AS2 / xml-gallery problem with html-text

**URL:** https://forum.kirupa.com/t/as2-xml-gallery-problem-with-html-text/304915
**Category:** Uncategorized
**Created:** [February 16, 2010, 1:11pm UTC](https://forum.kirupa.com/t/as2-xml-gallery-problem-with-html-text/304915 "2010-02-16T13:11:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![widecircle](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@widecircle](https://forum.kirupa.com/u/widecircle)
#### Post date: [February 16, 2010, 1:11pm UTC](https://forum.kirupa.com/t/as2-xml-gallery-problem-with-html-text/304915/1 "2010-02-16T13:11:07Z")

</div>

HI!  
I have an AS2 gallery that loads a xml-file with URL:s to images and text for each image. The problem I have is to display the text as html-text. The reason is that I would like be able to have links in the text to other websites and using bold tags etc… Below is some of the code & I think that this is where something needs to be changed?

```auto
function caricaGallery () {
    xmlFolder = "xml/";
    path = xmlFolder + "gallery.xml"; 
    
    var my_xml:XML = new XML ();
    my_xml.ignoreWhite = true;
    theImages = new Array ();
    my_xml.onLoad = function (success:Boolean) {
        if (success) {
            base = my_xml.firstChild.childNodes;
            for (m = 0; m < base.length; m++) {
                theImage = new Object ();
                theImage.url = base[m].childNodes[0].childNodes[0].nodeValue;
                theImage.descrizione = base[m].childNodes[1].childNodes[0].nodeValue;
                theImages.push (theImage);
            }
            creaImmagini ();
        }
    };
    my_xml.load (path);

```

}

The xml-file has this structure (in this case only one image):

```auto
<immagini>
    <immagine>
        <path>away.jpg</path>
        <descrizione>description two</a></descrizione>        
    </immagine>
</immagini>

```

I’ve tried setting the textfiled to display text as html text in the properties-panel and I 've tried to wrap the text within cdata-tags but nothing worked…

Anyone has an idea how this can be solved…?

All the best, Niklas
