Update xml-helpers.js

On Windows Desktop, "Non-whitespace before first tag." error occurs by an old code.