Code has been added to clipboard!

Node Values in XML Files

Example
<?php
  $xml = simplexml_load_file('bookstore.xml') or die('Failed to create an object');
  foreach($xml->children() as $books) {       	
    echo $books->name . ", ";     
    echo $books->by . ", ";     
    echo $books->released . ", ";      	
    echo $books->pricing . "<br>";
  }
?>