System.Xml.Xsl.Runtime.AncestorDocOrderIterator.Create C# (CSharp) Method

Create() public method

Initialize the AncestorDocOrderIterator (return ancestor nodes in document order, no possibility of duplicates).
public Create ( XPathNavigator context, XmlNavigatorFilter filter, bool orSelf ) : void
context System.Xml.XPath.XPathNavigator
filter XmlNavigatorFilter
orSelf bool
return void
        public void Create(XPathNavigator context, XmlNavigatorFilter filter, bool orSelf) {
            AncestorIterator wrapped = new AncestorIterator();

            wrapped.Create(context, filter, orSelf);

            // Fetch all ancestor nodes in reverse document order and push them onto the stack
            while (wrapped.MoveNext())
                stack.Push(wrapped.Current.Clone());
        }
AncestorDocOrderIterator