Ejemplo n.º 1
0
function olivxml_changeNode($node, $xml)
{
    $temp = new simpleXmlElement("<{$node}>" . (string) $xml . "</{$node}>");
    foreach ($xml->attributes() as $key => $value) {
        $temp->addAttribute($key, $value);
    }
    if (count($xml)) {
        foreach ($xml->children() as $entry) {
            olivxml_insert($temp, $entry);
        }
    }
    return $temp;
}