function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rusty12Rusty12 

Formatting an XML string to show indents (ie. pretty print)

I have Apex code in a controller class that uses the XMLStreamWriter to create an XML string and display the string on a Visualforce Page.  Everything is working fine except I can't find a graceful way to display the XML with indents (ie. pretty print) on the page.

 

Do I have to hard code the line breaks or is there a better solution I'm just not aware of?

 

Thanks in advance.

gresy pritty 8gresy pritty 8
The Capital One card has no foreign transaction fees, making it a great travel companion. Capital One Active Card