Use xml instead already parsed xml
Rewind StringIO instances before be parsed again
Merge pull request #10960 from pacoguzman/fix-build-due-to-10727

Fix build after #10727