# Formatting xml text

**URL:** https://forum.kirupa.com/t/formatting-xml-text/58578
**Category:** Uncategorized
**Created:** [July 23, 2004, 5:37pm UTC](https://forum.kirupa.com/t/formatting-xml-text/58578 "2004-07-23T17:37:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fumeng](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@fumeng](https://forum.kirupa.com/u/fumeng)
#### Post date: [July 23, 2004, 5:37pm UTC](https://forum.kirupa.com/t/formatting-xml-text/58578/1 "2004-07-23T17:37:43Z")

</div>

hi. i’m trying to format xml text with html tags. i’ve searched this forum and read some of the previous threads but still am a bit lost.

here’s a variable i create to hold the text i have in a [CDATA] tag:

```auto

instructionsText = unescape(stripSpaces(node.firstChild.firstChild.firstChild.nodeValue));

```

then later on i create a text field to put that variable in, i.e.:

```auto

// display instructions
ich.createTextField("inst", 998, 0, -10, 520, 40);
inch.inst.renderAsHTML = true;
ich.inst.text = instructionsText;
ich.inst.multiline = true;
ich.inst.wordWrap = true;
ich.inst.selectable = false;
ich.inst.setTextFormat(new TextFormat("Arial", 11, 0));

```

what am i missing? i thought this was the right way to do it…???

thanks. fumeng.
