Line breaks in XML not showing in browser but OK in view source

前端 未结 1 1993
滥情空心
滥情空心 2021-01-22 20:33

I have generated an XML file that and one of the nodes contains data that I need to be rendered in a specific way with line breaks/new lines:

This should

相关标签:
1条回答
  • 2021-01-22 21:15

    There is nothing in XML that would assist you with formatting text in the browser. If you want to format XML data for viewing in the browser you should transform the XML into HTML and apply the approriate HTML tags that will format the text as you want it to appear.

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