Ver Mensaje Individual
  #10 (permalink)  
Antiguo 07/06/2010, 10:19
Avatar de wiwi74
wiwi74
 
Fecha de Ingreso: marzo-2008
Mensajes: 515
Antigüedad: 16 años, 2 meses
Puntos: 10
Respuesta: Ven algo mal aqui?

Prueba esto:
Quite el loop while y coloque las etiquetas xml
Si no te da error es probable que estes recuperando de la base de daros algun elemento que "rompe" la estructra del xml.
(comente la linea //header("Content-Type: text/xml"); en todo caso descomentala)


Código PHP:

echo "<?xml version="1.0\" encoding=\"iso-8859-1\"?>"
//header("Content-Type: text/xml"); 
echo "<cu3er> 
    <settings>
        <prev_button>
            <defaults round_corners=\"5,5,5,5\"/> 
            <tweenOver tint=\"0xFFFFFF\" scaleX=\"1.1\" scaleY=\"1.1\"/> 
            <tweenOut tint=\"0x000000\" /> 
        </prev_button> 
        <prev_symbol> 
            <tweenOver tint=\"0x000000\" />             
        </prev_symbol> 
        <next_button> 
            <defaults round_corners=\"5,5,5,5\"/>             
            <tweenOver tint=\"0xFFFFFF\"  scaleX=\"1.1\" scaleY=\"1.1\"/> 
            <tweenOut tint=\"0x000000\" /> 
        </next_button> 
        <next_symbol> 
            <tweenOver tint=\"0x000000\" /> 
</next_symbol>     
</settings>"


/*
$consulta = mysql_query("SELECT * FROM noticias LIMIT 10"); 
$contar = 3; 
$title = $totolia[titulo]; 
function tituloseo($title) { 
$titulo2 = $totolia[titulo]; 
$espacio = " "; 
$guion = "-"; 
$tituloseo = str_replace($espacio , $guion , $titulo2); 

while ($totolia = mysql_fetch_array($consulta)) { 
$tituloseo = tituloseo($totolia[titulo]); 
echo "<slide>  
<url>".$totolia['imagen']."</url>  
<description>  
<link target='_blank'>noticia/".$totolia['imagen']."/".$tituloseo."</link>  
<heading>".$totolia['$titulo']."</heading>  
<paragraph>".$totolia['descripcion']."</paragraph>  
</description>  
<transition num='".$c."' slicing='vertical' direction='down'/></slide>";  
$c++;  
}
*/

echo "<slide>  
<url>Contenido<br /></url>  
<description>  
<link target='_blank'></link>  
<heading></heading>  
<paragraph></paragraph>  
</description>  
<transition num='' slicing='vertical' direction='down' />
</slide>"
;  

  
echo 
"</cu3er>";

Y esto te generaria un xml basico para poder ser usado:


Código PHP:

$fp=fopen("archivo.xml", "a"); 

$codeXML = " 
<?xml version='1.0' encoding='iso-8859-1'?> 
<etiquetas> 
<etiqueta1></etiqueta1> 
<etiqueta2></etiqueta2> 
</etiquetas>"; 

fwrite($fp,$codeXML);

Última edición por wiwi74; 07/06/2010 a las 10:42