Test stripping XML header

Test that the XML header is correctly removed and the html is trimmed.