# Removing "\\r\\n"

**URL:** <https://forum.kirupa.com/t/removing-r-n/233815>\
**Category:** Uncategorized\
**Created:** [July 27, 2007, 6:19am UTC](https://forum.kirupa.com/t/removing-r-n/233815 "2007-07-27T06:19:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bulletz](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bulletz](https://forum.kirupa.com/u/bulletz)\
**Post date:** [July 27, 2007, 6:19am UTC](https://forum.kirupa.com/t/removing-r-n/233815/1 "2007-07-27T06:19:24Z")

</div>

hello:

i have this xml file with this structure:

```auto

<?xml version="1.0" encoding="iso-8859-1"?>
<mgabalita>
 <balita date="26/07/2007" id="the_id" title="title">test
body
news </balita>
</mgabalita>

```

i have this code to load xml:

```auto

var angbalita_xml = new XML();
angbalita_xml.ignoreWhite = true;
angbalita_xml.onLoad = function(success) {
    if (success) {       
          var angbalita = angbalita_xml.firstChild.childNodes;       
          bodytxt = angbalita.childNodes;  
     } else {
          trace ("not loaded");
     }
}
newsinfo_xml.load ("thexmlfile.xml");

```

when “bodytxt” is displayed, it shows:

```auto

test
 
body
 
news
 

```

i want it to display like:

```auto

test
body 
news

```

i’m trying to use this code to remove excess "  
":

```auto

 badi = bodytxt.split("
").join("
"); 
trace(badi);

```

not sure if i declared it correctly, but it shows “undefined”

can somebody help me on this?  
thanks in advanced.  
any input is very much appreciated.
