<?php 
header("Content-type: text/xml");
echo "<?xml version='1.0' encoding='ISO-8859-1'?>";
    //mysql_connect("localhost", "username", "password") or die(mysql_error());   	// on-line version (not the actual one)
    //mysql_select_db("database") or die(mysql_error());              			// on-line version (not the actual one)
    mysql_connect("localhost", "aj", "aj1") or die(mysql_error());                    	// local version as used for testing
    mysql_select_db("FloridaMap") or die(mysql_error());                               	// local version as used for testing
    $result = mysql_query("SELECT * FROM iconmaingroup");
    echo "<iconmaingroup>";
        while($row = mysql_fetch_array($result)) {
            echo"<mainentry>";
                echo"<mainid>" . $row['mainID'] . "</mainid>";
                echo"<maingroup>" . $row['mainGroup'] . "</maingroup>";
                echo"<maindescription>" . $row['mainDescription'] . "</maindescription>";
            echo"</mainentry>";
        }
    echo "</iconmaingroup>";
?>