Hi Pamela, Thanks for your quick reply! Your advice is a step in the right direction, I am able to generate 'valid' xml from an item in the ArrayCollection. However, the constructor of LineString will still not the generated xml.
This is my actual code shortestPathAC = new ArrayCollection( result.result as Array ); var xml:XML = new XML(shortestPathAC.getItemAt(i).line_coords); var lineString:LineString = new LineString(xml::LineString) Let me show you the code and the resulting output. shortestPathAC.getItemAt(i).line_coords is a string: "<LineString><coordinates>6.88056,52.22626 6.88044,52.22631</ coordinates></LineString>" var xml:XML = new XML(shortestPathAC.getItemAt(i).line_coords); Alert.show(ObjectUtil.toString(xml)); --> shows : <LineString> <coordinates>6.88056,52.22626 6.88044,52.22631</coordinates> </LineString> Alert.show(ObjectUtil.toString(xml.coordinates)); --> shows 6.88056,52.22626 6.88044,52.22631 var lineString:LineString = new LineString(xml::LineString) --> shows TypeError: Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] element <LineString> to Namespace. This leads me to believe that the problem is not in the xml, but the LineString constructor can simply not use xml. Is this correct? Roel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
