'adds an element to an Element
Element.addElement(Element)'

def addElement(self, element, check_grammar=True):

    if (check_grammar and (self.allowed_children is not None)):
        if (element.qname not in self.allowed_children):
            raise IllegalChild(('<%s>    is    not    allowed    in    <%s>' % (element.tagName, self.tagName)))
    self.appendChild(element)
    self._setOwnerDoc(element)
    if self.ownerDocument:
        self.ownerDocument.rebuild_caches(element)
