hello:
i have this xml file with this structure:
<?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:
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:
test
body
news
i want it to display like:
test
body
news
i’m trying to use this code to remove excess "
":
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.