def newDoc(version):
    """Creates a new XML document """
    ret = libxml2mod.xmlNewDoc(version)
    if ret is None:raise treeError('xmlNewDoc() failed')
    return xmlDoc(_obj=ret)
Creates a new XML document