PurplePen.XmlInput.MoveToContent C# (CSharp) Method

MoveToContent() public method

Move to the next content node.
public MoveToContent ( ) : void
return void
        public void MoveToContent()
        {
            Reader.MoveToContent();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Load all of the objects from an XmlInput. It reads
        /// as many of the correct elements it can find in a row, and
        /// stops at the first element with the wrong element name.
        /// </summary>
        public void Load(XmlInput xmlinput)
        {
            T      temp    = new T();
            string element = temp.ElementName;

            xmlinput.MoveToContent();

            while (xmlinput.Name == element)
            {
                Id <T> id  = new Id <T>(xmlinput.GetAttributeInt("id"));
                T      obj = new T();
                obj.ReadAttributesAndContent(xmlinput);
                if (IsPresent(id))
                {
                    xmlinput.BadXml("Duplicate id '{0}'", id);
                }

                dict[id] = obj;
                if (id.id + 1 > next)
                {
                    next = id.id + 1;
                }

                xmlinput.MoveToContent();
            }
            ++changenum;
        }
All Usage Examples Of PurplePen.XmlInput::MoveToContent