* Handle the case of lxml not finding a document tree. * Parse the document encoding from the XML tag.