GetContentChild() 공개 정적인 메소드

Return the first content-typed child of the specified node. If the node has no children, or if the node is not content-typed, then do not set pageNode or idxNode and return false.
public static GetContentChild ( XPathNode &pageNode, int &idxNode ) : bool
pageNode XPathNode
idxNode int
리턴 bool
예제 #1
0
 public override bool MoveToFirstChild()
 {
     if (this.pageCurrent[this.idxCurrent].HasCollapsedText)
     {
         this.pageParent = this.pageCurrent;
         this.idxParent  = this.idxCurrent;
         this.idxCurrent = this.pageCurrent[this.idxCurrent].Document.GetCollapsedTextNode(out this.pageCurrent);
         return(true);
     }
     return(XPathNodeHelper.GetContentChild(ref this.pageCurrent, ref this.idxCurrent));
 }
        /// <summary>
        /// Move to the first content-typed child of the current node.  Return false if the current
        /// node has no content children.
        /// </summary>
        public override bool MoveToFirstChild()
        {
            if (_pageCurrent[_idxCurrent].HasCollapsedText)
            {
                // Virtualize collapsed text nodes
                _pageParent = _pageCurrent;
                _idxParent  = _idxCurrent;
                _idxCurrent = _pageCurrent[_idxCurrent].Document.GetCollapsedTextNode(out _pageCurrent);
                return(true);
            }

            return(XPathNodeHelper.GetContentChild(ref _pageCurrent, ref _idxCurrent));
        }
예제 #3
0
 public override bool MoveToChild(XPathNodeType type)
 {
     if (!this.pageCurrent[this.idxCurrent].HasCollapsedText)
     {
         return(XPathNodeHelper.GetContentChild(ref this.pageCurrent, ref this.idxCurrent, type));
     }
     if ((type != XPathNodeType.Text) && (type != XPathNodeType.All))
     {
         return(false);
     }
     this.pageParent = this.pageCurrent;
     this.idxParent  = this.idxCurrent;
     this.idxCurrent = this.pageCurrent[this.idxCurrent].Document.GetCollapsedTextNode(out this.pageCurrent);
     return(true);
 }
예제 #4
0
        /// <summary>
        /// Move to the first content child of the current node with the specified type.  Return false
        /// if the current node has no matching children.
        /// </summary>
        public override bool MoveToChild(XPathNodeType type)
        {
            if (_pageCurrent[_idxCurrent].HasCollapsedText)
            {
                // Only XPathNodeType.Text and XPathNodeType.All matches collapsed text node
                if (type != XPathNodeType.Text && type != XPathNodeType.All)
                    return false;

                // Virtualize collapsed text nodes
                _pageParent = _pageCurrent;
                _idxParent = _idxCurrent;
                _idxCurrent = _pageCurrent[_idxCurrent].Document.GetCollapsedTextNode(out _pageCurrent);
                return true;
            }

            return XPathNodeHelper.GetContentChild(ref _pageCurrent, ref _idxCurrent, type);
        }
예제 #5
0
        /// <summary>
        /// Move to the first content child of the current node with the specified type.  Return false
        /// if the current node has no matching children.
        /// </summary>
        public override bool MoveToChild(XPathNodeType type)
        {
            if (this.pageCurrent[this.idxCurrent].HasCollapsedText)
            {
                // Only XPathNodeType.Text and XPathNodeType.All matches collapsed text node
                if (type != XPathNodeType.Text && type != XPathNodeType.All)
                {
                    return(false);
                }

                // Virtualize collapsed text nodes
                this.pageParent = this.pageCurrent;
                this.idxParent  = this.idxCurrent;
                this.idxCurrent = this.pageCurrent[this.idxCurrent].Document.GetCollapsedTextNode(out this.pageCurrent);
                return(true);
            }

            return(XPathNodeHelper.GetContentChild(ref this.pageCurrent, ref this.idxCurrent, type));
        }