Groups | Blog | Home
all groups > flash actionscript > july 2007 >

flash actionscript : read dynamically generated xml in flash



Marty Party
7/4/2007 3:42:23 PM
Hi there,
I have dynamically generated xml from an sql database using php. The xml is
contained in a string in the source of a php file if you know what i mean. How
can I access and use this information from flash?
:confused;
I would appreciate any help!
Marty
cicnats
7/4/2007 9:09:53 PM
Marty Party
7/5/2007 12:00:00 AM
Hey,
thanks very much for your prompt and helpful reply. That solved it.
I wonder would you know how to indent the xml string that is generated. It is
all on one line when I view the source...
Thanks again
cicnats
7/5/2007 2:09:33 PM
spaces? tabs? new lines?

echo "<list>\n\t<item>first</item>\n\t<item>second</item>\n</list>";
or
echo "<list>\n <item>first</item>\n <item>second</item>\n</list>";

you get
<list>
_<item>first</item>
_<item>second</item>
</list>
(where _ stands for a tab or a blank space)

assuming you are building the xml element by element (like in a loop for
example) otherwise you'd need to write a function to parse and automatically
indent the xml that you first stored in a string and then output the result.
Marty Party
7/9/2007 2:04:41 PM
Thanks again for your help. God Bless.
AddThis Social Bookmark Button