pylib/uxml/tree.py
def xml_insert(self, child, index=-1):
        '''
        Append a node as the last child

        child - the child to append. If a string, convert to a text node, for convenience
        '''
        if isinstance(child, str):
            child = text(child, parent=self)
        else:
            child._xml_parent = weakref.ref(self)
        if index == -1:
            self.xml_children.append(child)
        else:
            self.xml_children.insert(index, child)
        return
def xml_insert(self, child, index=-1):
        '''
        Append a node as the last child

        child - the child to append. If a string, convert to a text node, for convenience
        '''
        if isinstance(child, str):
            child = text(child, parent=self)
        else:
            child._xml_parent = weakref.ref(self)
        if index == -1:
            self.xml_children.append(child)
        else:
            self.xml_children.insert(index, child)
        return
def xml_insert ( self , child , index = - 1 ) : if isinstance ( child , str ) : child = text ( child , parent = self ) else : child . _xml_parent = weakref . ref ( self ) if index == - 1 : self . xml_children . append ( child ) else : self . xml_children . insert ( index , child ) return
Append a node as the last child

        child - the child to append. If a string, convert to a text node, for convenience
Append a node as the last child