Is there any quick way converting
<?xml version="1.0"?><response><id>0123456</id><userid>0123</userid>
to
<?xml version="1.0"?>
<response>
<id>
0123456
</id>
<userid>
0123
</userid>
?
preferably client-side (JS) way
BeautifulSoup will do it. Not always perfectly, but it does okay. It’s available in Python and Ruby though, not JS.
ETA: I just found a pretty cool js + CSS solution from Google that does indentation and colours for XML and a dozen other things (such as js). It’s really pretty.Nevermind. It doesn’t handle xml indentation.