Home > Backend Development > PHP Tutorial > php创办xml并格式化输出

php创办xml并格式化输出

WBOY
Release: 2016-06-13 12:21:24
Original
1166 people have browsed it

php创建xml并格式化输出
DOMDocument创建xml,设$dom->formatOutput = true;但创建出来的只有根节点下的第一级节点才被格式化,而第一级节点下的子节点并没有(图1)。我想要的是整个xml文件都格式化输出(图2)
图1:

图2:
------解决思路----------------------
你的代码呢,贴出来呀。
------解决思路----------------------
善用tidy
这个咚咚是html/xml的福音,花点时间了解一下还是值得的

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