Prettify XML text in BBEdit
When XML data is sent back from a web service, it is in the form of a stream: there are no line breaks or indents to make it easier for humans to read. The example below is typical: the entire XML result is one continuous line. This makes it very hard to troubleshoot your application: you need a utility to put the indents and line-breaks back in.
Many users of BBEdit may not be aware that it has cleanup functions that will rapidly reformat HTML and XML code into a more legible structure. Here’s how to get to them:
Select “Tidy” from the Markup menu in BBEdit. Click on Reflow Document.
The default selections are probably OK, but you may want to check off the indenting options for block-level tags and attributes.
Click Reflow, and you should see something similar to the result shown here. Much easier to read!