PHP code to syntax-format XML content in a `pre` tag

南楼画角 提交于 2019-12-02 18:01:32

问题


I'm looking for way to format the XML syntax displayed in a pre tag on my sandbox web.

If you know how, please show me.


回答1:


You can have a look at Hyperlight or GeSHi (in PHP).

Perhaps you'd prefer to use a Javascript script: consider this list.




回答2:


If you want syntax highlighting then this is the only script / plugin you need -> http://alexgorbatchev.com/SyntaxHighlighter/

This is javascript though and will format it within the browser



来源:https://stackoverflow.com/questions/8008578/php-code-to-syntax-format-xml-content-in-a-pre-tag

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