Lire un fichier XML

à partir d'Ubuntu 9.04 le fichier se trouve dans ~/.local/share/rhythmbox/rhythmdb.xml)

Exemple avec un fichier rhythmbox:

<?php 
$file2open="rhythmdb.xml";
  if (file_exists($file2open)) {

  $xml = simplexml_load_file
($file2open);

 

  echo "<hr>Here is a dump of the data structure:";

 

  echo "<pre>";

  print_r($xml);

  echo "</pre>";

  

} else {

  exit('Failed to open' .$file2open);

}

?>
 
info/lire_un_fichier_xml.txt · Dernière modification: 2010/11/24 06:09 (modification externe)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki