Beispiel #1
0
        public override bool Read()
        {
            insideAttribute = false;

            if (entity != null && (entityInsideAttribute || entity.EOF))
            {
                CloseEntity();
            }
            if (entity != null)
            {
                if (entity.Read())
                {
                    return(true);
                }
#if NOT_PFX
                if (EntityHandling == EntityHandling.ExpandEntities)
                {
                    // EndEntity must be skipped
                    CloseEntity();
                    return(Read());
                }
                else
#endif
                return(true);                        // either success or EndEntity
            }
            else
            {
                if (!source.Read())
                {
                    return(false);
                }
#if NOT_PFX
                if (EntityHandling == EntityHandling.ExpandEntities &&
                    source.NodeType == XmlNodeType.EntityReference)
                {
                    ResolveEntity();
                    return(Read());
                }
#endif
                return(true);
            }
        }