我有一些以 xml 方式格式化的数据,我需要将其显示在弹出窗口的内容中。 xml 标签被解释为 html 标签...
<Document><and><age>50</age><always/></and></document>
我想将 xml 显示为简单文本并缩进。有办法做到这一点吗?
所以结果应该是:
<Document>
<and>
<age>50</age>
<always/>
</and>
</document>
非常感谢。
最佳答案
使用pre按以下方式标记此内容:
<pre lang="xml"><your xml here></pre>
还要在弹出窗口的选项中将 html 选项设置为 true。
关于jquery - 如何在 bootstrap 弹出窗口中显示格式化的 xml 文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42348395/