Ya cabros.....hice una parte de este embrollo, pude generar el archivo.xml sin problemas con
este codigo Código PHP:
<?Php
$chao = $_POST["chao"];
$arreglo_nombres=array(
"TITULO"=>$TITULO = $_POST["TITULO"],
"LINK"=>$LINK = $_POST["LINK"],
"RESUMEN"=>$RESUMEN = $_POST["RESUMEN"],
"NOTICIACOMPLETA"=>$NOTICIACOMPLETA = $_POST["NOTICIACOMPLETA"],
);
$buffer='<?xml version="1.0" encoding="utf-8"?>
<!-- Generando XML...-->
<file_xml> <NOTICIA>';
while (list ($etiqueta, $valor) = each ($arreglo_nombres)):
$buffer.="<$etiqueta>$valor</$etiqueta>";
endwhile;
$buffer.="</NOTICIA>";
$buffer.="</file_xml>";
$file=fopen("archivo.xml","w+");
fwrite ($file,$buffer);
fclose($file);
?>
pero ahora, el tema es actualizarlo y sumarle datos.....para eso debia utilizar el codigo ke les mostre anteriormente (post anterior) y sumarlo al que les mostre ahora, porque se supone que funciona....pero no
Código PHP:
<?
$buffer='<noticia>';
while (list ($etiqueta, $valor) = each ($arreglo_nombres)):
$buffer.="<$etiqueta>$valor</$etiqueta>";
endwhile;
$buffer.="</noticia>";
$buffer.="</file_xml>";
$file=fopen("archivo.xml","w+");
fwrite ($file,$buffer);
fclose($file);
if(file_exists("archivo.xml")){
$archivo = "archivo.xml";
$gestor = fopen($archivo, "a+");
fwrite($gestor, "$buffer");
fseek($gestor, 0);
} else {
$archivo = "archivo.xml";
$gestor = fopen($archivo, "a+");
fwrite($gestor, "<?xml version='1.0' encoding='iso-8859-1'?><informacion>");
fwrite($gestor, "$buffer");
fwrite($gestor, "</informacion>");
}
?>
Gracias