Creates a child node with the given attributes.
324453
def add_variation(self, move: chess.Move, *, comment: str = "", starting_comment: str = "", nags: Iterable[int] = ()) -> "GameNode":
        """"""
        node = type(self).dangling_node()
        node.move = move
        node.nags = set(nags)
        node.comment = comment
        node.starting_comment = starting_comment

        node.parent = self
        self.variations.append(node)
        return node
1005893
AttributeSet withAttributes(Attributes attributes) {

        return new AttributeSet(attributes, this.locale, this.level, this.section, this.printCondition, this.internals);

    }
125221
def add_child(self, node):
        
        assert isinstance(node, Node), "Child node must be a subclass of Node"
        node.parent = self
        self.children += [node]
288158
private function setAllChildren(\DOMDocument $dom, \DOMElement $node, array $attributes, $depth = 0)
    {
        static $iloop = 0;
        if ($depth == 0) {
            $iloop = 0;
        }

        foreach ($attributes as $a => $v) {
            $node->setAttribute($a, $v);
        }

        if (($iloop++ % 100) == 0) {
            usleep(1000);
        }

        for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
            $this->setAllChildren($dom, $n, $attributes, $depth + 1);
        }
    }
192351
def make_node(name, value=nil, attributes={})
      node = Ox::Element.new(name)

      node << value unless value.nil?
      attributes.each { |att, val| node[att] = val } unless attributes.empty?
      
      node
    end
98614
function createTree(){
    for (var i = 0; i < gRootNodes.length; ++i){
        var node = {
            _id : gRootNodes[i]._id, //todo : id instead of name?
            node : gRootNodes[i],
            parent : "root",
            childNodes : loadChildNodes(gRootNodes[i])
        };
        gTree.childNodes.push(node);
    }
}
73373
function fromHTML(html) {
                var div = document.createElement('div');
                div.innerHTML = html;
                return div.childNodes;
            }
365871
def tree_node_to_xml(self, parent, item):
        """"""

        tree = self.treeview
        data = self.treedata[item]
        node = data.to_xml_node()

        children = tree.get_children(item)
        for child in children:
            cnode = ET.Element('child')
            cwidget = self.tree_node_to_xml(item, child)
            cnode.append(cwidget)
            node.append(cnode)

        return node
336079
function (descriptor, rootScope, attributes, cidScope) {
                var childrenFromDescriptor = [], node, component;

                if (descriptor && descriptor.childNodes) {
                    for (var i = 0; i < descriptor.childNodes.length; i++) {
                        node = descriptor.childNodes[i];
                        component = this._createComponentForNode(node, _.clone(attributes), rootScope, cidScope);
                        if (component) {
                            childrenFromDescriptor.push(component);
                        }
                    }
                }

                return childrenFromDescriptor;
            }
144712
def append_attributes(self, content):
        
        attributes = AttrList(content.node.attributes)
        for attr in attributes.real():
            name = attr.name
            value = attr.value
            self.append_attribute(name, value, content)
545682
public Element appendChild(Node child) {
        Validate.notNull(child);

        // was - Node#addChildren(child). short-circuits an array create and a loop.
        reparentChild(child);
        ensureChildNodes();
        childNodes.add(child);
        child.setSiblingIndex(childNodes.size() - 1);
        return this;
    }
646746
def make_node(clss, node, *params):
        ''' 
        '''
        if node is None:
            node = clss()

        if node.token != 'PARAMLIST':
            return clss.make_node(None, node, *params)

        for i in params:
            if i is not None:
                node.appendChild(i)

        return node
254582
def add_node(node, parent):
    '''
    '''
    newNode = dict(node_id=node.id, children=[])
    parent["children"].append(newNode)
    if node.left: add_node(node.left, newNode)
    if node.right: add_node(node.right, newNode)
415409
public void addAttributes(Iterable<? extends QName> attributes) {
        Level current = path.getLast();
        for (QName attribute : attributes) {
            current.attributes.put(attribute,
                                   new Level(ATTR + getName(attribute)));
        }
    }
885679
def add_child(self, **kwargs):
        """"""
        cls = get_result_class(self.__class__)

        if len(kwargs) == 1 and 'instance' in kwargs:
            # adding the passed (unsaved) instance to the tree
            newobj = kwargs['instance']
            if newobj.pk:
                raise NodeAlreadySaved("Attempted to add a tree node that is "\
                    "already in the database")
        else:
            newobj = cls(**kwargs)

        try:
            newobj._cached_depth = self._cached_depth + 1
        except AttributeError:
            pass
        if not cls.node_order_by:
            try:
                max = cls.objects.filter(parent=self).reverse(
                )[0].sib_order
            except IndexError:
                max = 0
            newobj.sib_order = max + 1
        newobj.parent = self
        newobj.save()
        return newobj
972784
def add_children_to_node(self, node):
        
        if self.has_children:
            for child_id in self.children:
                child = self.runtime.get_block(child_id)
                self.runtime.add_block_as_child_node(child, node)
1062351
def assign(self, node):
        
        child_object = self.translate(node.child)
        child_object.prefix = 'CREATE TEMPORARY TABLE {name}({attributes}) AS '\
            .format(name=node.name, attributes=', '.join(node.attributes.names))
        return child_object