Example #1
0
        /// <summary>Constructor.</summary>
        /// <param name="s">Stream to parse</param>
        public APSIMFileReader(Stream s)
        {
            validModelTypes = ModelTypes.GetModelTypes();
            XmlDocument doc = new XmlDocument();

            doc.Load(s);
            reader       = new ReadWithLookAhead(new XmlNodeReader(doc.DocumentElement));
            currentState = States.Initial;
        }
Example #2
0
 /// <summary>Constructor.</summary>
 /// <param name="node">Node to parse</param>
 public APSIMFileReader(XmlNode node)
 {
     reader          = new ReadWithLookAhead(new XmlNodeReader(node));
     validModelTypes = ModelTypes.GetModelTypes();
     currentState    = States.Initial;
 }