public bool MoveToStartElement(string localname, string URN) { if (!this.isActive) { return(false); } this.currentDepth++; bool flag = false; for (int i = 0; i < this.axisStack.Count; i++) { AxisStack stack = (AxisStack)this.axisStack[i]; if (stack.Subtree.IsSelfAxis) { if (stack.Subtree.IsDss || (this.CurrentDepth == 0)) { flag = true; } } else if ((this.CurrentDepth != 0) && stack.MoveToChild(localname, URN, this.currentDepth)) { flag = true; } } return(flag); }
public bool MoveToStartElement(string localname, string?URN) { if (!_isActive) { return(false); } // for each: _currentDepth++; bool result = false; for (int i = 0; i < _axisStack.Count; ++i) { AxisStack stack = (AxisStack)_axisStack[i] !; // special case for self tree "." | ".//." if (stack.Subtree.IsSelfAxis) { if (stack.Subtree.IsDss || (this.CurrentDepth == 0)) { result = true; } continue; } // otherwise if it's context node then return false if (this.CurrentDepth == 0) { continue; } if (stack.MoveToChild(localname, URN, _currentDepth)) { result = true; // even already know the last result is true, still need to continue... // run everyone once } } return(result); }