I have this code (part of bigger script):
flashvars.xmlSource = "datasource.xml";
datasource.xml looks like:
<?xml version="1.0" encoding="utf-8"?>
<Object>
<Contents>
<Source="address" Title="title"></Source>
<Description><h1>New hot Features</h1><p>The all new Piecemaker comes with lots of new features, making it even more slick.</p><p>Just to mention a few - you can now specify unlimited transition styles, include your own SWF and Video files, add hyperlinks to images and info texts with all special characters.</p><p>We also impoved the navigation and the animation with animated shadows and pixel-perfect transitions.</p></Description>
(...)
</Contents>
</Object>
I want to generate datasource.xml dynamically using foreach loop.
I've just changed the file extension to .php but this is not that easy ;)
Any ideas?
Funny or not, but try this one:
<? PHP CODE HERE ?>
So handle it as if it would be some html file. What I mean is:
<?xml version="1.0" encoding="utf-8"?>
<Object>
<Contents>
<Source="address" Title="title"></Source>
<Description><h1>New hot Features</h1><p>The all new Piecemaker comes with lots of new features, making it even more slick.</p><p>Just to mention a few - you can now specify unlimited transition styles, include your own SWF and Video files, add hyperlinks to images and info texts with all special characters.</p><p>We also impoved the navigation and the animation with animated shadows and pixel-perfect transitions.</p></Description>
<? create php loop here ?>
</Contents>
</Object>
Also note
this line
<Source="address" Title="title"></Source>
might be wrong (you assigned some value to the tagname), try
<Source name="address" Title="title"></Source>
or something like that.