Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Extra spaces

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
I have some actionscript at the moment which is using a bit of php to read XML Feeds

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
 
just an update the bbc button is now pointing to the idependant link , so it is showing the spaces.

Chance,

Filmmaker, gentleman and polla stilo eleous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top