# Xml text formatting

**URL:** <https://forum.kirupa.com/t/xml-text-formatting/202802>\
**Category:** Uncategorized\
**Created:** [October 4, 2006, 11:42pm UTC](https://forum.kirupa.com/t/xml-text-formatting/202802 "2006-10-04T23:42:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superstring](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@superstring](https://forum.kirupa.com/u/superstring)\
**Post date:** [October 4, 2006, 11:42pm UTC](https://forum.kirupa.com/t/xml-text-formatting/202802/1 "2006-10-04T23:42:34Z")

</div>

There are a thousand threads on this, and I’ve been reading them, but I still can’t get my text from an xml file to format correctly with html tags. I’ve tried CDATA tags and plain old \<b\>, \<i\> tags and I get errors with both. When I use the regular html tags, the whole text field reads as “null”, and when I use the CDATA tags, it bolds everything except the text in the italic tag, which doesn’t show up at all. Any clues as to what I’m doing wrong?

Here is my xml code:

```auto
    <pic>
        <image>image1.jpg</image>
        <title>TITLE QUESTION?</title>
        <caption><![CDATA[<b>Here is<b/> <i>text that doesn't show up</i>and this shows up bold even though there's no tag.]]> </caption>
        <thumbnail>image1_th.jpg</thumbnail>
    </pic>

```

Here is my flash code:

f

```auto
unction nextImage() {
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            picture._alpha = 0;
            picture.loadMovie(image[p], 1);
            title_txt.text = title[p];
            desc.html = true;
            desc_txt.htmlText = description[p];
            picture_num();
        }
    }
}
function prevImage() {
    if (p>0) {
        p--;
        picture._alpha = 0;
        picture.loadMovie(image[p], 1);
        title_txt.text = title[p];
        desc.html = true;
        desc_txt.htmlText = description[p];
        picture_num();
    }
}
function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 0;
        picture.loadMovie(image[0], 1);
        title_txt.text = title[0];
        desc.html = true;
        desc_txt.htmlText = description[0];
        picture_num();
    }
}

```
