savexml() function: Put the internal xml document into a string;
For Example:
<code> "test.xml" <span><?xml version="1.0" encoding="ISO-8859-1"?></span><span><<span>note</span>></span><span><<span>to</span>></span>Tove<span></<span>to</span>></span><span><<span>from</span>></span>Jani<span></<span>from</span>></span><span><<span>heading</span>></span>Reminder<span></<span>heading</span>></span><span><<span>body</span>></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>
The above introduces the PHP savexml function, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.