System.Xml.Xsl.Runtime.XmlNavigatorFilter.MoveToContent C# (CSharp) Method

MoveToContent() public abstract method

Reposition the navigator to the first matching content node (inc. attributes); skip over filtered nodes. If there are no matching nodes, then don't move navigator and return false.
public abstract MoveToContent ( XPathNavigator navigator ) : bool
navigator System.Xml.XPath.XPathNavigator
return bool
        public abstract bool MoveToContent(XPathNavigator navigator);

Usage Example

Exemplo n.º 1
0
        public bool MoveNext()
        {
            if (_needFirst)
            {
                // Get first matching preceding-sibling node
                if (!_navCurrent.MoveToParent())
                {
                    return(false);
                }

                if (!_filter.MoveToContent(_navCurrent))
                {
                    return(false);
                }

                _needFirst = false;
            }
            else
            {
                // Get next matching preceding-sibling node
                if (!_filter.MoveToFollowingSibling(_navCurrent))
                {
                    return(false);
                }
            }

            // Accept matching sibling only if it precedes navEnd in document order
            if (_useCompPos)
            {
                return(_navCurrent.ComparePosition(_navEnd) == XmlNodeOrder.Before);
            }

            if (_navCurrent.IsSamePosition(_navEnd))
            {
                // Found the original context node, so iteration is complete.  If MoveNext
                // is called again, use ComparePosition so that false will continue to be
                // returned.
                _useCompPos = true;
                return(false);
            }

            return(true);
        }
All Usage Examples Of System.Xml.Xsl.Runtime.XmlNavigatorFilter::MoveToContent