def xml2dict(node, dic={}):
    '''
    @brief: 将xml解析树转成字典
    @param node: 树的根节点
    @type node: cElementTree.Element
    @param dic: 存储信息的字典
    @type dic: dict
    @return: 转换好的字典
    @rtype: dict
    '''
    dic[node.tag] = ndic = {}
    [xml2dict(child, ndic) for child in node.getchildren() if child != node]
    ndic.update([list(map(str.strip, exp.split('=')[:2]))
                 for exp in node.text.splitlines() if '=' in exp])
    return dic
@brief: 将xml解析树转成字典
@param node: 树的根节点
@type node: cElementTree.Element
@param dic: 存储信息的字典
@type dic: dict
@return: 转换好的字典
@rtype: dict
biliup/Danmaku/tars/__util.py