Chance1234
IS-IT--Management
I have some actionscript at the moment which is using a bit of php to read XML Feeds
it looks something like this
What I am trying to do is strip out extra spaces in the content
to better explain
CLick on the bbc button and the text is all together
enter in this feed
and theres huge ugly spaces.
Chance,
Filmmaker, gentleman and polla stilo eleous
it looks something like this
Code:
while (c) {
//text nodes are of type 3 - don't waste cycles looking at them
if (c.nodeType != 3) {
//check for a match to the node we want
if (c.nodeName == name) {
//if it matches, get the data from the subnodes by passing
//the current node's childNodes (which is an array) to the
//"getNodeText()" method
var itemDescr:String = getNodeText(c.childNodes, "description");
var itemTitle:String = getNodeText(c.childNodes, "title");
var itemLink:String = getNodeText(c.childNodes, "link");
//add formatting and update the variable that will get
//passed to the TextArea component
content += itemTitle +itemDescr;
}
//here's the recursive bit:
//call getContent on the current node
content += getContent(c, name);
}
What I am trying to do is strip out extra spaces in the content
to better explain
CLick on the bbc button and the text is all together
enter in this feed
and theres huge ugly spaces.
Chance,
Filmmaker, gentleman and polla stilo eleous