gpt4 book ai didi

python - 重新排列节点 lxml 中的属性

转载 作者:太空宇宙 更新时间:2023-11-04 06:12:27 25 4
gpt4 key购买 nike

<分区>

我有一个像

这样的元素节点
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Id="rId61" Target="media/image1.png"/>

我需要按顺序对属性进行排序。输出应该看起来像

<Relationship Id="rId61" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Target="media/image1.png"/>

我该如何重新排列它?目前我正在使用 lxml 库

谢谢

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com