PHP DomDocument Save XML with HTML

为君一笑 提交于 2019-12-13 06:34:15

问题


How would I save an XML file opened with DomDocument so that the HTML inside won't be encoded into HTML entities?


回答1:


I'd say, read through it however you normally are going to, then use html-entity-decode()

http://www.php.net/manual/en/function.html-entity-decode.php

in whatever you are using to write it back out as xml.



来源:https://stackoverflow.com/questions/1629890/php-domdocument-save-xml-with-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!