Below is a sample of my xml file:
<employee id="2" type="part-time">
<name>
<firstname>Ann</firstname>
<lastname>Jones</lastname>
</name>
<street>52 Cove Court</street>
</employee>
I can return results with httpService :
<mx:HTTPService
id="srv"
url="employee.xml"
resultFormat="e4x"
result="resultHandler(event);"
fault="faultHandler(event);"
/>
I can then access the values in the street tag, but NOT firstname or
lastname in a datagrid:
<mx:DataGrid dataProvider="{srv.lastResult.employee}">
<mx:columns>
<mx:DataGridColumn headerText="Name" dataField="name.firstname"/>
<mx:DataGridColumn headerText="Street" dataField="street"/>
</mx:columns>
</mx:DataGrid>
Is there a syntax problem with the way I am attempting to access
firstname and lastname? I am able to populate an xml object and
access firstname and lastname with:
myXML.employee.name.lastname
Thanks in advance for any assistance.