Add any element to the root
424705
function(name, attributes) {
        var el = et.Element(name);
        for (var a in attributes) {
            el.attrib[a] = attributes[a];
        }
        this.doc.getroot().append(el);
    }
582640
def add_child(self, child):
        ''''''
        super(RootNode, self).add_child(child)
        child.attr_wrapper = self.attr_wrapper
424785
function($root, $el, rentManager, manager) {
    var $filtered;

    // If selector is specified, attempt to find it.
    if (manager.selector) {
      if (rentManager.noel) {
        $filtered = $root.filter(manager.selector);
        $root = $filtered.length ? $filtered : $root.find(manager.selector);
      } else {
        $root = $root.find(manager.selector);
      }
    }

    // Use the insert method if the parent's `insert` argument is true.
    if (rentManager.insert) {
      this.insert($root, $el);
    } else {
      this.html($root, $el);
    }
  }
131233
private void addOuToTree(CmsOrganizationalUnit ou, CmsOrganizationalUnit parent_ou) {

        Item containerItem;
        containerItem = m_treeContainer.addItem(ou);
        if (containerItem == null) {
            containerItem = getItem(ou);
        }
        containerItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(ou, CmsOuTreeType.OU));
        containerItem.getItemProperty(PROP_TYPE).setValue(CmsOuTreeType.OU);
        m_treeContainer.setParent(ou, parent_ou);
    }
928392
public void addRootMenuItem(ContextMenuItemState rootItem, CmsContextMenuConnector connector) {

        CmsContextMenuItemWidget itemWidget = createEmptyItemWidget(
            rootItem.getId(),
            rootItem.getCaption(),
            rootItem.getDescription(),
            connector);
        itemWidget.setEnabled(rootItem.isEnabled());
        itemWidget.setSeparatorVisible(rootItem.isSeparator());

        setStyleNames(itemWidget, rootItem.getStyles());

        m_menuOverlay.addMenuItem(itemWidget);

        for (ContextMenuItemState childState : rootItem.getChildren()) {
            createSubMenu(itemWidget, childState, connector);
        }
    }
35662
def addNode(self, node):
        '''
        
        '''
        self.mybldgbuids[node.buid] = node
        self.allbldgbuids[node.buid] = (node, self.doneevent)
518182
private void fillNodesInScope(SiteNode rootNode, List<SiteNode> nodesList) {
		@SuppressWarnings("unchecked")
		Enumeration<TreeNode> en = rootNode.children();
		while (en.hasMoreElements()) {
			SiteNode sn = (SiteNode) en.nextElement();
			if (isInScope(sn))
				nodesList.add(sn);
			fillNodesInScope(sn, nodesList);
		}
	}
723130
function(rootNode, filters) {
            if(modules.utils.isString(filters)){
                filters = [filters];
            }
			var newRootNode = modules.domUtils.createNode('div'),
				items = this.findRootNodes(rootNode, true),
				i = 0,
				x = 0,
				y = 0;

            // add v1 names
            y = filters.length;
            while (y--) {
                if(this.getMapping(filters[y])){
                    var v1Name = this.getMapping(filters[y]).root;
                    filters.push(v1Name);
                }
            }

			if(items){
				i = items.length;
				while(x < i) {
					// append matching nodes into newRootNode
					y = filters.length;
					while (y--) {
						if(modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])){
							var clone = modules.domUtils.clone(items[x]);
							modules.domUtils.appendChild(newRootNode, clone);
							break;
						}
					}
					x++;
				}
			}

			return newRootNode;
		}
93497
public static <E> void rootElement(WebElement root, E element) {
		if (element == null || root == null) return;
		if (element instanceof WebElement) return;
		
		for (Class<?> clazz = element.getClass(); !clazz.equals(Object.class);
				clazz = clazz.getSuperclass()) {
			
			if (Enhancer.isEnhanced(clazz)) continue;
			
			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				setRootElementField(root, element, field);
			}
		}
	}
793309
def add_item(self, path, name, icon=None, url=None, order=None, permission=None, active_regex=None):
        
        if self.root_item is None:
            self.root_item = MenuItem('ROOT', 'ROOT')

        root_item = self.root_item
        current_path = ''
        for node in path.split('/')[:-1]:
            if not node:
                continue

            current_path = '/' + '{}/{}'.format(current_path, node).strip('/')
            new_root = root_item.child_by_code(node)
            if not new_root:  # Create menu item if not exists
                new_root = MenuItem(current_path, name=str(node).capitalize())
                root_item.add_child(new_root)
            root_item = new_root

        new_item = MenuItem(path, name, icon, url, order, permission, active_regex)

        current_item = root_item.child_by_code(path.split('/')[-1])
        if current_item:
            current_item.merge(new_item)
        else:
            root_item.add_child(new_item)
1311634
def insert(self, iterable, data=None, weight=1.0):
        
        self.root.insert(iterable, index=0, data=data, weight=1.0)
1258864
def add_node_parents(root: ast.AST) -> None:
    
    for node in ast.walk(root):
        for child in ast.iter_child_nodes(node):
            child.parent = node
551095
def push(self, x):
        """"""
        assert x not in self.rank
        i = len(self.heap)
        self.heap.append(x)    # add a new leaf
        self.rank[x] = i
        self.up(i)
447031
function isNodeInRoot(node, root) {
    node = ReactDOM.findDOMNode(node), root = ReactDOM.findDOMNode(root);
    return _isNodeInRoot(node, root);
}
381687
def addElement(self, parent, tag, value):
        """"""
        elem = self.rss.createElement(tag)
        node = self.rss.createTextNode(value)
        return parent.appendChild(elem).appendChild(node)
1032984
def add_from_xmlnode(self, element):
        """"""
        if self.tree is None:
            root = ET.Element('interface')
            root.append(element)
            self.tree = tree = ET.ElementTree(root)
            self.root = tree.getroot()
            self.objects = {}
            # ET.dump(tree)
        else:
            # TODO: append to current tree
            pass
218698
def add_edge(self, u, v):
        
        # ubin = self.find_root(u)
        ru = self.find_root(u)
        rv = self.find_root(v)
        ru = self.reroot(ru, u)
        rv = self.reroot(rv, v)

        ubin.set_child(vbin)

        pass