Home > Backend Development > PHP Tutorial > 怎么在服务器端保存XML

怎么在服务器端保存XML

WBOY
Release: 2016-06-13 11:10:17
Original
977 people have browsed it

如何在服务器端保存XML?
比如我在一个PHP頁面中用XML DOM给服务器端的某个Xml档新增了一些节点,请问如何保存?我在XML DOM中没有发现保存方法。


------解决方案--------------------
DOMDocument::save
------解决方案--------------------
DOMNode有两个方法:
insertBefore
appendChild
都能插入一条新的记录,
然后调用DOMDocument->saveXML();
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template