I am trying to find out a possible way to format the XML (actually it's
a SOAP message - both request and response) which is displayed in a
text box in my web app.
For eg if we have an XML string like this:
I want to prettify it like this for readability:
I went through the E4X spec, to figure out a way to add those white
spaces, but apparently I could not find any such methods or tags I
could add for formatting. I'm sure somebody might have tried to do
something similar with E4X, and been down on the same road, so without
re-inventing the wheel, I would like to know how to do it.
Hope to hear some responses on this.
Thanks in advance,