Enable xhtml parsing

See #820.

The automatic determination of the parsingMode based on the MIME header is currently not implemented, just want to get initial feedback on general structure.