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

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

            element = element.NextSibling;
            attrs   = null;
            return(true);
        }
예제 #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));
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }