Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Fix newline characters read in from XML (See related posts)

When you read an XML file that has newlines, Flash automatically strips them out. This fixes that. It's useful for displaying plain text in textfields.

private function fixXMLNewlines(str:String):String{
	var new_str:String = str.split("\\n").join("\n")
	return new_str
}

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts