Added better support for non-XML content