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

怎么在服务器端保存XML

WBOY
WBOYOriginal
2016-06-13 11:10:17914browse

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


------解决方案--------------------
DOMDocument::save
------解决方案--------------------
DOMNode有两个方法:
insertBefore
appendChild
都能插入一条新的记录,
然后调用DOMDocument->saveXML();
Statement:
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