public override bool MoveToParent()
 {
     if (!element.HasParent)
     {
         return(false);
     }
     element = element.Parent;
     attrs   = null;
     return(true);
 }
Beispiel #2
0
 public AttributeNodes(AttributeNodes other)
 {
     node = other.node;
     if (node != null)
     {
         InitialiseAttributeEnumerator();
         index = other.index;
         ResetToCurrentLocation();
     }
 }
        public override bool MoveToFirstChild()
        {
            if (!element.HasFirstChild)
            {
                return(false);
            }

            element = element.FirstChild;
            attrs   = null;
            return(true);
        }
        public override bool MoveToNext()
        {
            if (!element.HasNextSibling)
            {
                return(false);
            }

            element = element.NextSibling;
            attrs   = null;
            return(true);
        }
Beispiel #5
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            AttributeNodes attributeNodes = obj as AttributeNodes;

            if (attributeNodes == null)
            {
                return(false);
            }
            return(index == attributeNodes.index && Equals(node, attributeNodes.node));
        }
        public override bool MoveToFirstAttribute()
        {
            IHTMLAttributeCollection collection = (IHTMLAttributeCollection)CurrentNode.attributes;

            if (collection == null)
            {
                return(false);
            }

            attrs = new AttributeNodes(CurrentNode);
            if (!attrs.MoveNext())
            {
                attrs = null;
                return(false);
            }
            return(true);
        }
        public override bool MoveTo(XPathNavigator other)
        {
            NavigableDocument o = other as NavigableDocument;

            if (o == null)
            {
                return(false);
            }

            element = new ElementNode(o.element);

            if (o.attrs != null)
            {
                attrs = new AttributeNodes(o.attrs);
            }
            return(true);
        }