/*
Extracts the text value from all nodes in the given NodeList and puts them into an array

@param {XPathResult} oNodeList - As many nodes as should be checked for Record values
@return {object[]} Array of values
@static
@private
961137
function(oNodeList) {
		var aNodeValues = [];
		var xPath = AnnotationParser._oXPath;

		for (var i = 0; i < oNodeList.length; i += 1) {
			var oNode = xPath.nextNode(oNodeList, i);
			var oValue = {};
			var sText = xPath.getNodeText(oNode);
			// TODO: Is nodeName correct or should we remove the namespace?
			oValue[oNode.nodeName] = AnnotationParser._parserData.aliases ? AnnotationParser.replaceWithAlias(sText) : sText;
			aNodeValues.push(oValue);
		}

		return aNodeValues;
	}
872934
function() {
    var slice = Array.prototype.slice;
    var args = slice.call(arguments);
    var nodeLists = args.map(function(list) {
      return slice.call(list);
    });
    return Array.prototype.concat.apply([], nodeLists);
  }
503576
function getNodesByNameHelper(childArray, name) {
  let nodes = [].concat(childArray.filter(element => element.name === name));
  let otherNodes = [];
  childArray.forEach(node => {
    if (hasChildren(node)) {
      otherNodes = otherNodes.concat(getNodesByNameHelper(node.children, name));
    }
  });
  return nodes.concat(otherNodes);
}
390655
function parseExtractor (inp) {
    var match = inp.takeAPeek(EXTRACTOR);
    if (match)
      return wrapped("(", ")", parsePattern, extractorRes, inp)
          || nodeExtractor(match[1]);
  
    function extractorRes (res) {
      return nodeExtractor(match[1], res);
    }
  }
97861
function (oTreeModel, aAdditionalRuleSetsNames) {

			if (!aAdditionalRuleSetsNames) {
				return;
			}

			aAdditionalRuleSetsNames.forEach(function (sRuleName) {
				Object.keys(oTreeModel).forEach(function(iKey) {
					if (oTreeModel[iKey].name === sRuleName) {
						oTreeModel[iKey].selected = false;
						oTreeModel[iKey].nodes.forEach(function(oRule){
							oRule.selected = false;
						});
					}
				});
			});

			return oTreeModel;
		}
298508
protected function childrenAsArray($nodeList)
	{
		$result = array();
		if (! is_object($nodeList))
		{
			return $result;
		}

		if (! ($nodeList instanceof DOMNodeList))
		{
			return $result;
		}

		for ($i = 0; $i < $nodeList->length; $i++)
		{
			$result []= $nodeList->item($i);
		}

		return $result;
	}
1305467
function(nodeList){
			var last = nodeList[nodeList.length - 1];
			// If the last node in the list is not an HTMLElement
			// it is a nodeList so call `last` again.
			if(last.nodeType) {
				return last;
			} else {
				return nodeLists.last(last);
			}
		}
816945
public void logDomNodeList (String msg, NodeList nodeList) {
		StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement ();

		String toLog = (msg != null ? msg + "\n" : "DOM nodelist:\n");
		for (int i = 0; i < nodeList.getLength (); i++) {
			toLog += domNodeDescription (nodeList.item (i), 0) + "\n";
		}

		if (caller != null) {
			logger.logp (Level.FINER, caller.getClassName (), caller.getMethodName () + "():" + caller.getLineNumber (), toLog);
		} else {
			logger.logp (Level.FINER, "(UnknownSourceClass)", "(unknownSourceMethod)", toLog);
		}
	}
361396
function(masterNodeList, index, length) {
		var removedMappings = masterNodeList.splice(index + 1, length),
			itemsToRemove = [];
		removedMappings.forEach( function(nodeList) {

			// Unregister to free up event bindings.
			var nodesToRemove = nodeLists.unregister(nodeList);

			// add items that we will remove all at once
			[].push.apply(itemsToRemove, nodesToRemove);
		});
		return itemsToRemove;
	}
767257
function indexOf(nodeList, el) {
  return Array.prototype.slice.call(nodeList).indexOf(el);
}
700536
def _get_first_aggregate_text(node_list):
    '''
    
    '''
    if not node_list:
        return ''

    out = []
    for node in node_list[0].childNodes:
        if node.nodeType == dom.Document.TEXT_NODE:
            out.append(node.nodeValue)
    return '\n'.join(out)
937186
function (selector) {
            var nodes = [];
            if (vQ.isFunction(selector) && selector.call !== undefined) {
                this.each(function (idx) {
                    if (!selector.call(this, idx)) nodes.push(this);
                });
            } else {
                var excludes = typeof selector == 'string' ?
                    this.filter(selector) : (vQ.isArrayLike(selector) && vQ.isFunction(selector.item)) ? slice.call(selector) : vQ(selector);
                this.each(function (inx, el) {
                    if (excludes.indexOf(el) < 0){
                        nodes.push(el);
                    }
                });
            }
            return vQ(nodes);
        }
465748
public static NodeList getNodeListByXPath(String expression, Object source) {
		return (NodeList) getByXPath(expression, source, XPathConstants.NODESET);
	}
128901
public static NodeList toNodeList(Object o, NodeList defaultValue) {
	// print.ln("nodeList:"+o);
	if (o instanceof NodeList) {
	    return (NodeList) o;
	}
	else if (o instanceof ObjectWrap) {
	    return toNodeList(((ObjectWrap) o).getEmbededObject(defaultValue), defaultValue);
	}
	return defaultValue;
    }
742781
function(oNode) {
		var xPath = AnnotationParser._oXPath;

		var sValue = "";
		if (oNode.nodeName in mAliasNodeWhitelist) {
			sValue = AnnotationParser.replaceWithAlias(xPath.getNodeText(oNode));
		} else {
			sValue = xPath.getNodeText(oNode);
		}
		if (oNode.nodeName !== "String") {
			// Trim whitespace if it's not specified as string value
			sValue = sValue.trim();
		}
		return sValue;
	}
285089
function(ctx) {
    assert(this.args.length == 2);
    var nodes = this.args[0].evaluate(ctx).nodeSetValue();
    var delim = this.args[1].evaluate(ctx).stringValue();
    var ret = '';
    for (var i = 0; i < nodes.length; ++i) {
      if (ret) {
        ret += delim;
      }
      ret += xmlValue(nodes[i]);
    }
    return new StringValue(ret);
  }
962993
public NodeList getNodeList(Object node, String expression) {
		return (NodeList) evalXPath(expression, node, XPathConstants.NODESET);
	}