# ActionScript or Component? Which is the best for XML data?

**URL:** <https://forum.kirupa.com/t/actionscript-or-component-which-is-the-best-for-xml-data/230979>\
**Category:** Uncategorized\
**Created:** [June 30, 2007, 7:13pm UTC](https://forum.kirupa.com/t/actionscript-or-component-which-is-the-best-for-xml-data/230979 "2007-06-30T19:13:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SparseMatrix](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@SparseMatrix](https://forum.kirupa.com/u/SparseMatrix)\
**Post date:** [June 30, 2007, 7:13pm UTC](https://forum.kirupa.com/t/actionscript-or-component-which-is-the-best-for-xml-data/230979/1 "2007-06-30T19:13:52Z")

</div>

[SIZE=2]I was very excited about the “XML-Driven Drop-Down Menu” tutorial, [http://www.kirupa.com/developer/actionscript/xml\_dropdown\_menu.htm](http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm) and I hoped to apply it with a database connection using the other tutorials in the Server Side & Flash section of the Kirupa tutorials for Flash. But my project also was to include a data display which required a DataGrid. And so I looked up the tutorial “Using the DataGrid Component”, [http://www.kirupa.com/developer/flash8/datagrid.htm](http://www.kirupa.com/developer/flash8/datagrid.htm). But this tutorial used ActionScript to generate an array that was used to populate the DataGrid. Naturally, I looked up other tutorials on applying XML to the DataGrid and in Flash 8 Professional, this is a very natural thing to do using components. It seemed to me that using components to reach and display my PHP generated XML was the quickest solution to my project.

However, I am having considerable difficulty trying to grasp how it is that data is managed by way of the component schema, especially in reference to the XMLConnector. If I use an XML file exported from MySQL, the XML file is not recognized at all like the examples provided by Macromedia’s tutorials. If there is a way to make MySQL exported records show up in XMLConnector, I can see nothing in Macromedia’s documentation that shows how to do it. Since I control how the XML is generated by way of the examples in Kirupa’s tutorials, this is not a complete obstacle to my project. And, I am ready to give the project over to ActionScript completely. But the Components and the Component Inspector suggest useful tools and I remain tempted to struggle with them some more.

Which should I choose? Should I just leave the component interface alone and generate my objects with ActionScript? Or can I get all the results I want using the Component Inspector? If so, are there some better references on how to manage the schemas?  
[/SIZE]
