meps_ie.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:europarl 作者: chozelinek 项目源码 文件源码
def serialize(self, infile, root):
        ofile_name = os.path.splitext(os.path.basename(infile))[0]
        ofile_path = os.path.join(self.outdir, ofile_name+'.xml')
        xml = etree.tostring(
            root,
            encoding='utf-8',
            xml_declaration=True,
            pretty_print=True).decode('utf-8')
        with open(ofile_path, mode='w', encoding='utf-8') as ofile:
            ofile.write(xml)
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号