Add check for mime type before processing XML.
Merge pull request #4 from t4k/7.x-1.3

Use datastream object to check mime type before processing XML.