【发布时间】:2021-08-10 02:04:48
【问题描述】:
我有以下 xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<ABCDE>
<global>
...
</global>
<rf>
<r1>
<type> 1 </type>
<location> /root/1 </location>
<tag> cloud </tag>
<src_path> tmp/ggg </src_path>
</r1>
<r1>
<type> 1 </type>
<location> /root/1 </location>
<tag>lll</tag>
<src_path> tmp/lll </src_path>
</r1>
当 ABCDE/rf/src_path 为 tmp/lll 时,我需要标记为“xxx”
谢谢,
【问题讨论】:
-
你想把
<tag>lll</tag改成<tag>xxx</tag>吗?
标签: python xml-parsing