# Hanging indent when displaying xml data

**URL:** <https://forum.kirupa.com/t/hanging-indent-when-displaying-xml-data/276206>\
**Category:** flash\
**Created:** [November 24, 2008, 2:58pm UTC](https://forum.kirupa.com/t/hanging-indent-when-displaying-xml-data/276206 "2008-11-24T14:58:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeanPaul\_Bardou](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@JeanPaul\_Bardou](https://forum.kirupa.com/u/JeanPaul_Bardou)\
**Post date:** [November 24, 2008, 2:58pm UTC](https://forum.kirupa.com/t/hanging-indent-when-displaying-xml-data/276206/1 "2008-11-24T14:58:12Z")

</div>

Hi,

I am reading an xml file into my flash project, and I display the html-formatted data.

The problem is that I get a hanging indent on the first line of each paragraph, like this.

This is the data, and you can see  
that it has an indent on its first line.

Where I would like to see this:

This is the data, and you can see  
that it does not have an indent on  
its first line.

Simple question, I would suppose, for one who knows the answer.

Some of the code, if that can help

// Define variables  
var xmlLoader:URLLoader = new URLLoader();  
var xmlData:XML = new XML();  
var \_titles:Array = new Array();  
\_titles[0] = new TextField();

// setup listener on xl data load  
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

function LoadXML(e:Event):void //restore for event  
{  
xmlData = new XML(e.target.data); // restore for event  
\_titles[0].htmlText = xmlData.\_2\_header;  
addChild(\_titles[0]); // \<-------THAT IS WHERE I GET THE BLASTED HANGING INDENT!  
}

Hope somebody can help.

Very truly yours,

Jean-Paul

P.S.

I suspect that it has to do with prettyIndent and prettyPrinting, and I could not make it to work.
