Changed order of lines in generated xml (xml tag comes first).
Update to pretty printing.