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 be the first line
this should be the second line
When I load the XML in browser and view source it looks spot on, I can copy and paste the data with the structure maintained. In the browser however it is rendered as:
This should be the first line this should be the second line
Any ideas?
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.