def enclosenode(self, parent, node, pcontent='',ncontent='',\
      pattrib=None, nattrib=None):

        """
        Takes as arguments the name of a parent node,that of a child one,their
        attributes and contents respectively expressed;returns a new entity formed
        by the two nodes - in other words the child folded in the parent.
        Wrapper around buildnode

        """

        tmparent = parent
        tmpnode = node
        tmparent = self.buildnode(parent,1,attrib = pattrib,content = pcontent)
        tmpnode = self.buildnode(node,0,attrib = nattrib, content = ncontent)
        node = tmparent[0] + pcontent + tmpnode + tmparent[2]
        return node

        Takes as arguments the name of a parent node,that of a child one,their
        attributes and contents respectively expressed;returns a new entity formed
        by the two nodes - in other words the child folded in the parent.
        Wrapper around buildnode

        
recipes/Python/498101_Simpliest_XML_generator/recipe-498101.py