Detect XML documents

This should fix #779.

I'm not sure if there's anything else needed?
The test is just the really simple SVG document from #779.

I think it's possible to improve the XML regex, but I'm not sure of any cases where that might be necessary.