# Dynamic Text

**URL:** <https://forum.kirupa.com/t/dynamic-text/245237>\
**Category:** Uncategorized\
**Created:** [November 27, 2007, 6:52pm UTC](https://forum.kirupa.com/t/dynamic-text/245237 "2007-11-27T18:52:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparky\_157](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sparky\_157](https://forum.kirupa.com/u/sparky_157)\
**Post date:** [November 27, 2007, 6:52pm UTC](https://forum.kirupa.com/t/dynamic-text/245237/1 "2007-11-27T18:52:28Z")

</div>

i modified a few scripts to come up with this

```auto
function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
        caption = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            
            caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue + xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
        
        comment_txt.text =caption;}
    } else {
        content = "file not loaded!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("news.xml");

```

how do i add returns and font styles to it?
