savexml()函数:将内部xml文档放入一个字符串;
For Example:
<code> "test.xml" <span><?xml version="1.0" encoding="ISO-8859-1"?></span><span>note</span>><span>to</span>>Tove<span><span>to</span>></span><span>from</span>>Jani<span><span>from</span>></span><span>heading</span>>Reminder<span><span>heading</span>></span><span>body</span>>Don't forget me this Weekend!<span><span>body</span>></span><span><span>note</span>></span>$xmlDoc=new DOMDocument(); $xmlDoc->load("test.xml"); print $xmlDoc->saveXML(); OUTPUT: Tove Jani Reminder Don't forget me this weekend! </code>
以上就介绍了PHP savexml函数,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。