PHP asXML()函数
实例
格式化 XML(版本 1.0)中的 SimpleXML 对象的数据:
<?php
$note=<<<XML
<note>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
XML;
$xml=new SimpleXMLElement($note);
echo $xml->asXML();
?>
定义和用法
asXML()函数格式化 XML(版本 1.0)中的 SimpleXML 对象的数据