Fixed an issue where XML and HTML files would throw an error whenever starting or finishing a tag.