有没有办法可以替换 xml 文件中相同标记的不同文本?

问题描述

<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T13:41:40+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T13:40:08+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-30T15:58:04+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T13:41:40+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T10:50:16+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T10:50:17+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T13:40:08+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-31T10:50:17+00:00</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com</loc>
<lastmod>2020-12-30T15:59:39+00:00</lastmod>
<priority>0.8</priority>
</url>

我想在标签之间更改日期,我在 20 个不同日期的 xml 文件中有 200 多个。我怎样才能更快地改变?

我认为它们可以成为我们释放不同日期的一种方式,因为我们将这些日期放在 lastmod 标签

请帮忙,谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...