Remove all child nodes of a group, except the v:group element
164799
function () {
		var element = this.element,
			childNodes = element.childNodes,
			i = childNodes.length,
			node;

		while (i--) {
			node = childNodes[i];
			node.parentNode.removeChild(node);
		}
	}
909556
def _filter_xpath_grouping(xpath):
    

    # First remove the first open parentheses
    xpath = xpath[1:]

    # Next remove the last closed parentheses
    index = xpath.rfind(')')
    if index == -1:
        raise XpathException("Invalid or unsupported Xpath: %s" % xpath)
    xpath = xpath[:index] + xpath[index + 1:]
    return xpath
950155
public static void remove(Xml root, String group)
    {
        Check.notNull(root);
        Check.notNull(group);

        for (final Xml node : root.getChildren(NODE_COLLISION))
        {
            if (node.readString(ATT_GROUP).equals(group))
            {
                root.removeChild(node);
            }
        }
    }
940705
function removeChildInternals (withoutInternal) {
  return _.chain(withoutInternal)
    .map((item, key) => {
      const withoutInternal = removeInternalValues(item)
      if (withoutInternal !== undefined && withoutInternal !== item) {
        return [key, withoutInternal]
      }
    })
    .filter()
    .fromPairs()
    .value()
}
86257
function childNodesFromPaths (files, parent, renderLabelFn, originalFiles, baseDir) {
  // Group by first path element
  var groups = _.groupBy(files, file => file.match(/^[^/]*\/?/))
  return Object.keys(groups).map(function (groupKey) {
    const group = groups[groupKey]
    // Is this group explicitly part of the result, or
    // just implicit through its children
    const explicit = group.indexOf(groupKey) >= 0
    let index = -1
    if (explicit) {
      index = originalFiles.indexOf(parent.replace(baseDir, '') + groupKey)
    }

    return {
      label: renderLabelFn(parent, groupKey, explicit, explicit ? index : -1),
      nodes: childNodesFromPaths(
        // Remove parent directory from file paths
        group
          .map(node => node.substr(groupKey.length))
          // Skip the empty path
          .filter(node => node),
        // New parent..., normalize to one trailing slash
        parent + groupKey,
        renderLabelFn,
        originalFiles,
        baseDir
      )
    }
  })
}
324289
function cleanAst(node) {
  var copy = {};

  Object.keys(node).forEach(function (key, i) {
    if (key !== 'parent' && key !== 'prev' && key !== 'next' && key !== '_items') {
      copy[key] = node[key];
    }
  });

  node = copy;

  if (node.nodes) {
    var children = node.nodes;
    node.nodes = [];
    children.forEach(function (childNode, i) {
      if (childNode.type) {
        node.nodes.push(cleanAst(childNode));
      } else {
        node.nodes.push(childNode);
      }
    });
  }

  return node;
}
517555
function (node) {
        var children = this._children;
        var idx = children.indexOf(node);
        if (idx < 0) {
            return;
        }

        children.splice(idx, 1);
        node._parent = null;

        if (this._scene) {
            node.traverse(this._removeSelfFromScene, this);
        }
    }
70685
function removeChildrenL2(data = []) {
  const ds = cloneDeep(data);
  ds.forEach((item) => {
    if (item.children) {
      item.children.forEach((subItem) => {
        if (subItem.children) {
          delete subItem.children;
        }
      });
    }
  });
  return ds;
}
904449
function cleanUpElement(element) {
		const childNodes = element.childNodes;

		for (let i = 0; i < childNodes.length; i++) {
			const node = childNodes[i];

			let isVisible = node.nodeType === 1 ? window.getComputedStyle(node).display !== 'none' : true;
			if (isVisible && ['input', 'textarea', 'script', 'noscript', 'style', 'select', 'option', 'button'].indexOf(node.nodeName.toLowerCase()) >= 0) isVisible = false;

			if (!isVisible) {
				element.removeChild(node);
			} else {
				cleanUpElement(node);
			}
		}
	}
1143491
function(){
			var indicator = lib.node(this._prefix+this._id);
			if (indicator) {
				indicator.parentNode.removeChild(indicator);
			}
		}
1094741
public static void removeAllChildren(final Node node) {
        assert node != null;
        assert node.getNodeType() != Node.ATTRIBUTE_NODE;
        if (node.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
            Element documentElement = ((Document) node).getDocumentElement();
            if (documentElement != null) {
                ((Document) node).removeChild(documentElement);
            }
            return;
        }
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Element element = (Element) node;
            for (Node n = element.getFirstChild(); n != null; n = element.getFirstChild()) {
                element.removeChild(n);
            }
        }
    }
1080123
function unwrapElements(parent, wrapper) {
  var el = wrapper.childNodes[0];

  // ok, so this looks weird, right?
  // turns out, appending nodes to another node will remove them
  // from the live NodeList, so we can keep iterating over the
  // first item in that list and grab all of them. Nice!
  while (el) {
    parent.appendChild(el);
    el = wrapper.childNodes[0];
  }

  parent.removeChild(wrapper);
}
550838
function(elem) {
		if (elem) {
			while (isWhitespace(elem.firstChild)) {
				// trim leading whitespace text nodes
				elem.removeChild(elem.firstChild);
			}
			// trim leading whitespace text
			trimPattern(elem.firstChild, LEADING);
			while (isWhitespace(elem.lastChild)) {
				// trim trailing whitespace text nodes
				elem.removeChild(elem.lastChild);
			}
			// trim trailing whitespace text
			trimPattern(elem.lastChild, TRAILING);
		}
	}
885805
function endNode() {
            if (parent.children) {
                mergeChildren(parent.children);
                sortChildren(parent.children);
            }
            parent = parentsStack.pop();
        }
852180
function removeElementById(elementId) {
  let el = document.getElementById(elementId);
  if (el) {
    el.parentNode.removeChild(el);
  }
}
3705
function removeAllSwatchGroups() {
  for (var i = 0; i < doc.swatchGroups.length; i++) {
    doc.swatchGroups[i].remove();
  }
}
150155
function(ctx) {
		var node = ctx.node;
//		DT.debug("nodeRemoveChildMarkup()", node.toString());
		node.visit(function(n){
			if(n.tr){
				$(n.tr).remove();
				n.tr = null;
			}
		});
	}