Use DomDocument to prettify __toString() output.