From: te0t3l on
Hi, I have a photo gallery and I update it with a XML file like this:

$NuevaCol = new SimpleXMLElement("../xml/" . $coleccionXML . '.xml', null,
true);
$first = $NuevaCol->addChild('coleccion');
$attsNuevaCol = $first->addAttribute('nombre_col',
utf8_encode($titNuevaColEspacios));
$attsNuevaCol = $first->addAttribute('archivo', utf8_encode($uploadDir .
$nombreMiniatura));
$NuevaCol->asXML("../xml/" . $coleccionXML . '.xml');


Now I try to include the new Child at the begining of the document because I
want that the last update will be show the first in the gallery, do me
explain?
How can I do it?,

Thanks in advance,

te0