def t2x(tree):
    """
    | convert docutils.nodes.document_tree  to xml 
    
    :param docutils.nodes.document.
        doc-tree-root-node
    
    :return: string.
        xml_str
    """
    xdom = tree.asdom()
    xml_str = xdom.toprettyxml()
    xml_str = xml_str.replace('\t', ' ' * 4)
    return xml_str
