Fix invalid xml generation with indention on xml(true).
Fix invalid xml generation with indention on xml(true).

* hotfix/v0.3.1:
  Fix invalid xml generation with indention on xml(true).