Revert "fix #831. The XmlReader shouldn't consume the entire input stream before calling the block."

This reverts commit 2302c3f29f456f1857b0ee9e13508d47ba0470f5.