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

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

            element = element.NextSibling;
            attrs   = null;
            return(true);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }