GetElementSibling() public static method

Return a following sibling element of the specified node that has the specified name. If no such sibling exists, or if the node is not content-typed, then do not set pageNode or idxNode and return false. Assume that the localName has been atomized with respect to this document's name table, but not the namespaceName.
public static GetElementSibling ( XPathNode &pageNode, int &idxNode, string localName, string namespaceName ) : bool
pageNode XPathNode
idxNode int
localName string
namespaceName string
return bool
Example #1
0
        /// <summary>
        /// Move to the first element sibling of the current node with the specified name.  Return false
        /// if the current node has no matching element siblings.
        /// </summary>
        public override bool MoveToNext(string localName, string namespaceURI)
        {
            if ((object)localName != (object)_atomizedLocalName)
                _atomizedLocalName = (localName != null) ? NameTable.Get(localName) : null;

            return XPathNodeHelper.GetElementSibling(ref _pageCurrent, ref _idxCurrent, _atomizedLocalName, namespaceURI);
        }
Example #2
0
 public override bool MoveToNext(string localName, string namespaceURI)
 {
     if (localName != this.atomizedLocalName)
     {
         this.atomizedLocalName = (localName != null) ? this.NameTable.Get(localName) : null;
     }
     return(XPathNodeHelper.GetElementSibling(ref this.pageCurrent, ref this.idxCurrent, this.atomizedLocalName, namespaceURI));
 }