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