Listing 1

<?xml version="1.0" encoding="utf-8"?>
<CurrentWeather>
<Location>Amsterdam Airport Schiphol,
Netherlands (EHAM) 52-18N 004-46E -
2M</Location>
<Time>Oct 02, 2003 - 02:25 PM EDT /
2003.10.02 1825 UTC</Time>
<Wind> Variable at 2 MPH (2 KT):0</Wind>
<Visibility> 3 mile(s):0</Visibility>
<SkyConditions> partly
cloudy</SkyConditions>
<Temperature> 57 F (14 C)</Temperature>
<DewPoint> 51 F (11 C)</DewPoint>
<RelativeHumidity> 82%</RelativeHumidity>
<Pressure> 29.85 in. Hg (1011
hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>

Listing 2

class WeatherFormatter extends mx.data.binding.
CustomFormatter {
function format ( rawValue : String ) :
String {
var retVal : String = "";
// convert to XML object
var myXML : XML = new XML(
rawValue );
myXML.ignoreWhite = true;
// parse second node to XML tree
myXML.parseXML( myXML.childNodes[1] );
// loop through childNodes
for ( var i : Number = 0; i <
myXML.firstChild.childNodes.length; i++ ) {
retVal += myXML.firstChild.childNodes[ i
].firstChild + newline;
}
return retVal;
}
function unformat ( formattedValue : String
) : String {
var retVal : String = "" ;
return retVal;
}
}