jkbr/httpie — pull request #172 by unsignedint (2013-10-15 23:43:53+00:00)
Title: process XML data before pretty-printing to trim whitespace

When receiving XML data that is already 'pretty' the current pretty printing process seems to add extra new line characters. I've modified the code to actually strip whitespace from the source input which seems to resolve this.

Input:
```python
>>> raw = '\n blah\n 123 \n\n'
>>> print raw

blah
123

```

Current:
```python

>>> print parseString(raw).toprettyxml(indent=' '*4)

blah

123

```

With patch:
```python
>>> processed = ''.join((x.strip() for x in raw.split('\n')))
>>> print parseString(processed).toprettyxml(indent=' '*4)

blah

123

```