/// <summary> /// Initializes an empty Specification from an XML document /// </summary> public static void InitFromXmlDocument(Specification S, XmlDocument doc) { XmlElement rootElement = doc.DocumentElement; //System.Console.WriteLine(rootElement.Name); if (rootElement.Name != XML_G25_SPEC) throw new G25.UserException("Missing root element " + XML_G25_SPEC + " in XML file."); ParseRootElement(S, rootElement); // initializes the RefGA.Metric variables of the m_metrics S.FinishMetric(); // check if specification is sane S.CheckSpecificationSanity(); }