Add check for mime type before processing XML.