Shortened the isXMLDoc code, based upon recommendation from Andrea.