| From: | te0t3l | Date: | Sat, 03 Jul 2010 17:58:23 +0000 |
| Subject: | |||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306667@lists.php.net to get a copy of this message | ||
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