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

后端 未结 2 1271
谎友^
谎友^ 2021-01-26 04:45

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.

相关标签:
2条回答
  • 2021-01-26 05:01

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

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

    0 讨论(0)
  • 2021-01-26 05:12

    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

    0 讨论(0)
提交回复
热议问题