x
 
<!DOCTYPE html>
<html>
<body>
<?php
$myXMLData =
"<?xml version='1.0' encoding='UTF-8'?>
<note>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Do not forget the meeting!</body>
</note>";
$xml=simplexml_load_string($myXMLData) or die("错误:无法创建对象");
print_r($xml);
?>
</body>
</html>