I don't like this loop. Something like `xmltext.index('<')` followed by `io.seek` could be a lot faster.