code: def isempty(self, content=True):
          
          nochildren = not self.children
          notext = self.text is None
          nocontent = nochildren and notext
          if content:
              return nocontent
          noattrs = not len(self.attributes)
          return nocontent and noattrs
docs: Get whether the element has no children.
  
          @param content: Test content (children & text) only.
          @type content: boolean
          @return: True when element has not children.
          @rtype: boolean