private AnyTreeXPathNavigator(AnyTreeXPathNavigator other)
 {
     _sourceElementNode   = other._sourceElementNode;
     _sourceAttributeNode = other._sourceAttributeNode;
     _nodeType            = other._nodeType;
     _nameTableStub       = other._nameTableStub;
 }
        public override bool MoveToNextAttribute()
        {
            var nextAttribute = _sourceAttributeNode.GetNext();

            if (nextAttribute != null)
            {
                _sourceAttributeNode = nextAttribute;
                _nodeType            = XPathNodeType.Attribute;
                return(true);
            }

            return(false);
        }
        public override bool MoveToFirstAttribute()
        {
            var attributes = new CachedEnumerable <IXPathAttribute>(_sourceElementNode.Element.GetAttributes());

            if (attributes.ReadUntil(0))
            {
                _sourceAttributeNode = new AnyAttributeNode(attributes, 0);
                _nodeType            = XPathNodeType.Attribute;
                return(true);
            }

            return(false);
        }