public override XPathNavigator Clone()
        {
            NavigableDocument other = new NavigableDocument();

            other.document = document;
            other.MoveTo(this);
            return(other);
        }
        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);
        }
        public override bool IsSamePosition(XPathNavigator other)
        {
            NavigableDocument o = other as NavigableDocument;

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

            if (!document.Equals(o.document) || !element.Equals(o.element))
            {
                return(false);
            }

            if (o.attrs == null && attrs == null)
            {
                return(true);
            }

            return(attrs.Equals(o.attrs));
        }
Beispiel #4
0
 public override XPathNavigator Clone()
 {
     NavigableDocument other = new NavigableDocument();
     other.document = document;
     other.MoveTo(this);
     return other;
 }