/// <summary>Constructor</summary> /// <param name="enclosing"></param> /// <param name="parentNode">the node which children shall be iterated.</param> /// <param name="parentPath">the full path of the former node without the leaf node.</param> public NodeIteratorChildren(XmpIterator enclosing, XmpNode parentNode, string parentPath) : base(enclosing) { _enclosing = enclosing; if (parentNode.Options.IsSchemaNode) { _enclosing.BaseNamespace = parentNode.Name; } _parentPath = AccumulatePath(parentNode, parentPath, 1); _childrenIterator = parentNode.IterateChildren(); }
/// <summary>Constructor for the node iterator.</summary> /// <param name="enclosing"></param> /// <param name="visitedNode">the currently visited node</param> /// <param name="parentPath">the accumulated path of the node</param> /// <param name="index">the index within the parent node (only for arrays)</param> public NodeIterator(XmpIterator enclosing, XmpNode visitedNode, string parentPath, int index) { _enclosing = enclosing; _visitedNode = visitedNode; _state = IterateNode; if (visitedNode.Options.IsSchemaNode) { _enclosing.BaseNamespace = visitedNode.Name; } // for all but the root node and schema nodes _path = AccumulatePath(visitedNode, parentPath, index); }
/// <summary>Default constructor</summary> protected NodeIterator(XmpIterator enclosing) => _enclosing = enclosing;
/// <summary>Default constructor</summary> protected NodeIterator(XmpIterator enclosing) { _enclosing = enclosing; }