better root element detection for atom content type xhtml (closes #720)