/// <summary>Find or create a qualifier node under a given parent node.</summary>
        /// <remarks>
        /// Find or create a qualifier node under a given parent node. Returns a pointer to the
        /// qualifier node, and optionally an iterator for the node's position in
        /// the parent's vector of qualifiers. The iterator is unchanged if no qualifier node (null)
        /// is returned.
        /// <em>Note:</em> On entry, the qualName parameter must not have the leading '?' from the
        /// XMPPath step.
        /// </remarks>
        /// <param name="parent">the parent XMPNode</param>
        /// <param name="qualName">the qualifier name</param>
        /// <param name="createNodes">flag if nodes shall be created</param>
        /// <returns>Returns the qualifier node if found or created, <c>null</c> otherwise.</returns>
        /// <exception cref="XmpException"></exception>
        private static XmpNode FindQualifierNode(XmpNode parent, string qualName, bool createNodes)
        {
            Debug.Assert(!qualName.StartsWith("?"));
            var qualNode = parent.FindQualifierByName(qualName);

            if (qualNode == null && createNodes)
            {
                qualNode = new XmpNode(qualName, null)
                {
                    IsImplicit = true
                };
                parent.AddQualifier(qualNode);
            }
            return(qualNode);
        }