Example #1
0
        public void ParseStream(TextReader AStream)
        {
            String line;

            line = AStream.ToString();
            while ((line = AStream.ReadLine()) != null)
            {
                this.ParseLine(line);
            }
        }
Example #2
0
        /// <summary>
        /// Load a TextReader into the parser. The data from this TextReader needs to be
        /// in the correct XML format.
        /// </summary>
        /// <param name="textReader">The TextReader to load.</param>
        public void loadTextReader(TextReader textReader)
        {
            // Save the current input source, so that a session can be restarted.
            reader = textReader.ToString();

            // Load the data from the textReader
            xmlDoc = new XmlDocument();
            xmlDoc.Load(textReader);

            // Retrieve every second defined in the scenario
            secondNodeList = xmlDoc.GetElementsByTagName("second");

            secondIndex = 0;
        }