From:  "Oshani" <oshanis@gmail.com>
Date:  29 Jun 2006 14:34:10 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.jseng
Subject:  

Formatting XML with E4X

NNTP-Posting-Host:  222.165.182.230

Hi,

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:
BBDD

I want to prettify it like this for readability:

       
               BB
        
        
               
                      DD
                
         


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,
Oshani