Changed the XmlDoc to a proper constructor