$xml = simplexml_load_file('example.xml'); //Create SimpleXML object
var_dump($xml); // Output XML
?>
$xml = simplexml_load_file ('example.xml'); echo "$a-> name
"; //Read XML file
echo $xml- >depart->name[0]; ml->depart-> children() as $depart) . XML data
}
?>
$xml = simplexml_load_file('example.xml'); //Read XML file
$result = $xml->xpath('/departs/depart/employees/employee/name'); //Define nodes
var_dump($result ) ;
$xml->depart->name[0] = "Human Resource"; " //Standardization XML data
?>
$xml = simplexml_load_file('example.xml'); //Read XML data
$newxml = $xml->asXML(); //Standardize XML data
$fp = fopen("newxml .xml", "w"); //Open the file to write XML data
fwrite($fp, $newxml); //Write XML data
fclose($fp); since