bueno despues de todo me salio crear categorias en xml conphp aqui dejo el codigo parque alguien que tenga el mismo problema espero que el ssirva
///*****************
<?php
/*Estas son las variables que se utilizaran para crear la conexion a tu base de datos, practicamente pues solo tendrias que colocar tus datos */
$host = "localhost";
$user = "root"; $pass = "root";
$database = "bd";
/* Ahora si, comenzamos iniciando la conexion, de la forma siguiente, y agregamos los "or die" por si algo ocurre antes de realizar la conexion nos lo indique */
$linkID = mysql_connect($host, $user, $pass) or die("No se pudo conectar al servidor.");
mysql_select_db($database, $linkID) or die("Problemas al acceder a la base de datos");
//creando querys---------------------------------------------------------------------------
$query = "SELECT * FROM tabla where categoria ='1' ORDER BY id DESC";
$resultID = mysql_query($query, $linkID) or die("Problemas al importar los datos.");
//------------------------------------------------------------------------------------
$query2 = "SELECT * FROM tabla where categoria ='2' ORDER BY id DESC";
$resultID2 = mysql_query($query2, $linkID) or die("Problemas al importar los datos.");
//----------------------------------------------------------------------------------------
$query3 = "SELECT * FROM tabla where categoria ='3' ORDER BY id DESC";
$resultID3 = mysql_query($query3, $linkID) or die("Problemas al importar los datos.");
//------------------------------------------------------------------
$query4 = "SELECT * FROM tabla where categoria ='4' ORDER BY id DESC";
$resultID4 = mysql_query($query4, $linkID) or die("Problemas al importar los datos.");
//------------------------------------------------------------------------------------------
$query5 = "SELECT * FROM tabla where categoria ='5' ORDER BY id DESC";
$resultID5 = mysql_query($query5, $linkID) or die("Problemas al importar los datos.");
//-------------------------------------------------------------------------------------------
$query6 = "SELECT * FROM tabla where categoria ='6' ORDER BY id DESC";
$resultID6 = mysql_query($query6, $linkID) or die("Problemas al importar los datos.");
//------------------------------------------------------------------------------------------
$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output .= "<gallery thumbDir=\"./images/thumbs/\" imageDir=\"./images/\" random=\"true\">\n";
$xml_output .= "\t<category name=\"Accesorios\">\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ;
$x++){ $row = mysql_fetch_assoc($resultID);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
} $xml_output .= "\t</category>\n";
///------------------------------
$xml_output .= "\t<category name=\"Estribos\">\n";
for($b = 0 ; $b < mysql_num_rows($resultID2) ;
$b++){ $row2 = mysql_fetch_assoc($resultID2);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
}$xml_output .= "\t</category>\n";
///------------------------------
$xml_output .= "\t<category name=\"Hebillas\">\n";
for($c = 0 ; $c < mysql_num_rows($resultID3) ;
$c++){ $row3 = mysql_fetch_assoc($resultID3);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
} $xml_output .= "\t</category>\n";
///------------------------------
$xml_output .= "\t<category name=\"Articulos Publicitarios\">\n";
for($d = 0 ; $d < mysql_num_rows($resultID4) ;
$d++){ $row4 = mysql_fetch_assoc($resultID4);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
}$xml_output .= "\t</category>\n";
///------------------------------
$xml_output .= "\t<category name=\"Liquidacion\">\n";
for($e = 0 ; $e < mysql_num_rows($resultID5) ;
$e++){ $row5 = mysql_fetch_assoc($resultID5);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
}
$xml_output .= "\t</category>\n";
///------------------------------
$xml_output .= "\t<category name=\"Novedades\">\n";
for($f = 0 ; $f < mysql_num_rows($resultID6) ;
$f++){ $row6 = mysql_fetch_assoc($resultID6);
$xml_output .= "\t\t<image>\n";
$xml_output .= "\t\t\t<date>" . $row['date'] . "</date>\n";
$xml_output .= "\t\t\t<title>" . $row['titulo'] . "</title>\n";
$xml_output .= "\t\t\t<desc>" . $row['descripcion'] . "</desc>\n";
$xml_output .= "\t\t\t<thumb>" . $row['fotopeque'] . "</thumb>\n";
$xml_output .= "\t\t\t<img>" . $row['fotogrande'] . "</img>\n";
$xml_output .= "\t\t</image>\n";
}
///------
$xml_output .= "\t</category>\n";
$xml_output .= "</gallery>";
$fh = fopen("archivo.xml","w"); fwrite($fh,$xml_output); fclose($fh);
?>