Fixed a bug where the DOCTYPE wouldn't be found if there wasn't any xml preamble.