Reading XML

I have an application im designing thats size or height is determined by how many string characters are present in an external XML content sheet.

However the prob i have found is that if there is a line break in the XML this isnt taken into consideration. The whole line of white space needs to be considered for.

My application will have say 100 character per line, so for everyline break in the xml i need to add an extra 100 characters to my height.

Is there a way to detect line space or can anyone suggest a work around?

Linebreaks: “\r”, “
” or both.
i.e.:

trace("abcd\rdcba");
trace("abcd\rdcba\refg".replace(/\r/g, "\r-------\r"));

I’ll check it out thanks, never seen the replace tags before.

How would I relate this to the text in the XML?

txtFld.text.replace(/\r/g, “\rmyreplacetext\r”); Doesnt work
xml.replace(/\r/g, “\rmyreplacetext\r”); Doesnt work

var randomStringWithLinebreaks:String = 'abcd\rabcdef\rabcdefghijklm\rabcdefghijkl\rabcdefghijklmopqrst';
trace('-------------');
trace('* before *\r');
trace(randomStringWithLinebreaks);
trace('-------------');
var arr:Array = randomStringWithLinebreaks.split('\r');
var i:int = 0;
while(i < arr.length) {
	var charsToAdd:int = 11 - arr*.length;
	var tempString:String;
	if (charsToAdd > 0)	{
		arr* = arr* + new Array(charsToAdd).join('*');
	} else {
		tempString = arr*.slice(10, arr*.length);
		arr* = arr*.slice(0, 10);
		arr.splice(i + 1, 0, tempString);
	}
	i++;
}
randomStringWithLinebreaks = arr.join('\r');
trace('* after *\r');
trace(randomStringWithLinebreaks);
trace('-------------');

Does it have to be something like this?
.replace was used to show what happens if you remove/insert linebreak characters (notice, XML.replace() and String.replace() are two different functions).

Wow thats a handfull.

At first glance it does look like it will do the trick, ill check it out and see where it takes me.
Thanks for the effort