0

I want to display a huge XML on the HTML page using Angular 8. I have using an external package to properly format the XML (with proper indentation and line breaks), however, XML appears in one line on the UI when I use string interpolation. It appear properly when I use the <pre> tag, but then it ignores my CSS.

Is there a way to display properly formatted XML along with CSS styles on it?

ConnorsFan
  • 70,558
  • 13
  • 122
  • 146
Pritam Bohra
  • 3,912
  • 8
  • 41
  • 72
  • Did you see [this question](https://stackoverflow.com/q/42268268/1009922)? – ConnorsFan Jan 10 '20 at 15:37
  • @ConnorsFan I saw that, but, even in that solution
     is being used. When I use 
     my CSS doesn't get applied. How do I deal with that?
    – Pritam Bohra Jan 10 '20 at 16:42
  • 1
    Can you change your CSS so that it is applied to `pre` elements? – ConnorsFan Jan 10 '20 at 16:46
  • Does this answer your question? [How to preserve line breaks in block?](https://stackoverflow.com/questions/1011641/how-to-preserve-line-breaks-in-code-block) – kvetis Jan 10 '20 at 16:50

0 Answers0