Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/09/2010, 16:22
Avatar de gachon
gachon
 
Fecha de Ingreso: septiembre-2004
Ubicación: En Google
Mensajes: 462
Antigüedad: 19 años, 8 meses
Puntos: 3
me lo muestra pero no lo guarda funcion simplexml

estoy inntentando armar un formulario para añadir editar y borrar registro del xml
este es el siguiente codigo me lo muestra perno no me lo guarda
Código PHP:
$source 'content.xml';
// load as string
$xmlstr file_get_contents($source);
$sitemap = new SimpleXMLElement($xmlstr);
// load as file
$image $sitemap->addChild('image');
$image->addAttribute('Caption',$_POST["Caption"]);
$image->addChild('comentarios','http://php-design-patterns.com');
header('Content-type: text/xml');
echo 
$sitemap->asXML();