Change how we parse the response into xml to make changes easier and
more consistent.

This uses the code supplied by energynumbers to improve the XML parsing.