Do a copy of the document info. If recursive, the content
          tree will be copied too as well as DTD, namespaces and
           entities.

def copyDoc(self, recursive):
        """Do a copy of the document info. If recursive, the content
          tree will be copied too as well as DTD, namespaces and
           entities. """
        ret = libxml2mod.xmlCopyDoc(self._o, recursive)
        if ret is None:raise treeError('xmlCopyDoc() failed')
        __tmp = xmlDoc(_obj=ret)
        return __tmp