Example #1
0
        /// <summary>
        /// Reads and populates data from an xml file.
        /// </summary>
        public void ReadXml(XmlReader reader)
        {
            reader.Read();
            reader.Read();
            Type = (LocatorType)int.Parse(reader["type"]);

            reader.ReadStartElement("lba");
            while (2 > 1)
            {
                switch (reader.NodeType)
                {
                case XmlNodeType.Element:
                    ILocator newLocator = CreateLocator();
                    newLocator.ReadXml(reader);
                    Locators.Add(newLocator);
                    reader.ReadEndElement();
                    continue;

                case XmlNodeType.EndElement:
                    return;
                }
            }
        }