Here's the idea....
Given an input string containing XML data, without any indentation, output a string of XML with proper indentation.
Example:
Input string:
<collection><book id="1"><title>Charlie and the Chocolate Factory</title></book><book id="2"><title>C, How to Program</title</book></collection>
Output string:
<collection>
<book id="1">
<title>Charlie and the Chocolate Factory</title>
</book>
<book id="2">
<title>C, How to Program</title
</book>
</collection>
I've never tried to tackle anything like this before, so any help is appreciated. I just need a starting point.