Example #1
0
        public void ReadXml(System.Xml.XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                return;
            }

            while (true)
            {
                reader.Read();

                if (reader.MoveToContent() == XmlNodeType.EndElement)
                {
                    return;
                }

                XObject sub = (XObject)ClassFactory.CreateObject(reader.LocalName);
                sub.ReadXml(reader);

                this.Add(sub);
            }
        }
Example #2
0
        public void ReadSubcomponents(XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                return;
            }

            while (true)
            {
                reader.Read();

                if (reader.MoveToContent() == XmlNodeType.EndElement)
                {
                    return;
                }

                XObject sub = ClassFactory.CreateObject(reader.LocalName);
                sub.ReadXml(reader);

                AddSubcomponent(reader.LocalName, sub);
            }
        }