Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Charger le fichier XML selon l’API disponible

classes
{filelink=15057}

<?php

$classes = get_declared_classes();

if( in_array('SimpleXMLElement', $classes) ) {
    $xmldoc = simplexml_load_file('myfile.xml');

} elseif( in_array('DOMDocument', $classes) )
{
    $xmldoc = new DOMDocument();
    $xmldoc->load('myfile.xml');

} else {
}
?>

No comments yet.

Leave a Comment