网络编程
位置:首页>> 网络编程>> php编程>> PHP asXML()函数讲解

PHP asXML()函数讲解

作者:php参考手册  发布时间:2023-06-08 14:04:37 

标签:php,asxml(),函数

PHP asXML()函数

实例

格式化 XML(版本 1.0)中的 SimpleXML 对象的数据:


<?php
$note=<<<XML
<note>
<to>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 对象的数据。

语法


asXML( _filename_ );

PHP asXML()函数讲解

PHP asXML()函数讲解

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com