The XMPIterator implementation. Iterates the XMP Tree according to a set of options. During the iteration the XMPMeta-object must not be changed. Calls to skipSubtree() / skipSiblings() will affect the iteration. @since 29.06.2006
Inheritance: IXmpIterator
            /// <summary>
            /// Constructor </summary>
            /// <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(XmpIteratorImpl outerInstance, XmpNode parentNode, string parentPath)
                : base(outerInstance, parentNode, parentPath, 0)
            {
                _outerInstance = outerInstance;
                if (parentNode.Options.SchemaNode)
                {
                    outerInstance.BaseNs = parentNode.Name;
                }
                _parentPath = AccumulatePath(parentNode, parentPath, 1);

                _childrenIterator = parentNode.IterateChildren();
            }
            /// <summary>
            /// Constructor for the node iterator. </summary>
            /// <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(XmpIteratorImpl outerInstance, XmpNode visitedNode, string parentPath, int index)
            {
                _outerInstance = outerInstance;
                _visitedNode   = visitedNode;
                _state         = ITERATE_NODE;
                if (visitedNode.Options.SchemaNode)
                {
                    outerInstance.BaseNs = visitedNode.Name;
                }

                // for all but the root node and schema nodes
                _path = AccumulatePath(visitedNode, parentPath, index);
            }
Ejemplo n.º 3
0
            /// <summary>
            /// Constructor </summary>
            /// <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(XmpIteratorImpl outerInstance, XmpNode parentNode, string parentPath)
                : base(outerInstance, parentNode, parentPath, 0) {
                _outerInstance = outerInstance;
                if (parentNode.Options.SchemaNode) {
                    outerInstance.BaseNs = parentNode.Name;
                }
                _parentPath = AccumulatePath(parentNode, parentPath, 1);

                _childrenIterator = parentNode.IterateChildren();
            }
Ejemplo n.º 4
0
            /// <summary>
            /// Constructor for the node iterator. </summary>
            /// <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(XmpIteratorImpl outerInstance, XmpNode visitedNode, string parentPath, int index) {
                _outerInstance = outerInstance;
                _visitedNode = visitedNode;
                _state = ITERATE_NODE;
                if (visitedNode.Options.SchemaNode) {
                    outerInstance.BaseNs = visitedNode.Name;
                }

                // for all but the root node and schema nodes
                _path = AccumulatePath(visitedNode, parentPath, index);
            }