Update XMLWriter.php

Bugfixing WriteElement