Click to See Complete Forum and Search --> : xml loading trough php

06-14-2001, 10:24 AM

i seem to have a problem loading xml
I am trying to use php to collect the data from the datebase and send it as xml to flash
The php file/code works. I checked.
But nothing appears on screen
when using a "menu.xml"-file the xmldata comes shows. but not when using menu.php

So what's wrong ?

db_array = new Array();
xmlmenu = new XML();
xmlmenu.onLoad = make_db;


06-15-2001, 06:47 AM
Oeps sorry,

I made a mistake in the .php file

So , for those having similar problems
XML is very precise:
I forgot the first return before menusystem
I works fine now

echo '<?xml version="1.0" encoding="iso-8859-1"?>';
echo '<!DOCTYPE menusystem SYSTEM "xmlmenu.dtd">';
echo "\n<menusystem>\n";

//getting menudata from db:

for ($i=0;$i<=count($menu);$i++)
echo "<menu>\n";
echo " <id>".$menu[$i]["id"]."</id>\n";
echo " <parent>".$menu[$i]["parent"]."</parent>\n";
echo " <naam>".$menu[$i]["naam"]."</naam>\n";
echo " <sjabloon>".$menu[$i]["sjabloon"]."</sjabloon>\n";
echo "</menu>\n";

echo " </menusystem>";
[Edited by paul67 on 06-15-2001 at 06:49 AM]