PhoneFormatter for formatting unformatted phone digits
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:XML id="myData"> <root> <contactlist> <item name="contact" phone="2016679872" /> </contactlist> </root> </mx:XML> <mx:PhoneFormatter id="fmtNumber" formatString="(###) ###-####" /> <mx:Label text="Contact Phone: {fmtNumber.format(myData.contactlist.item.@phone)}" /> </mx:Application>