Parse XML with Line Breaks!


/ Published in: ActionScript 3
Save to your folder(s)

Its a nice lil trick ;)


Copy this code and paste it in your HTML
  1. _xmlLoader.addEventListener(Event.COMPLETE, function(e2:Event):void {
  2. _xmlData = new XML(e2.target.data);
  3. var titleList:XMLList = _xmlData.Book.title;
  4. var titleListLength:int = titleList.length();
  5. _ecoText.text = '';
  6. for(var i=0 ; i<titleListLength ; i++){
  7. _ecoText.appendText(titleList[i]+String.fromCharCode(10,13));
  8. _ecoText.setTextFormat(_ecoFormat);
  9. }
  10.  
  11. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.