0
我有页眉和页脚像一个XML文件:XML字符串替换在Windows批处理文件
set "header=<?xml version="1.0" encoding="UTF-8"?><Config xmlns="http://namespace.com/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">"
set "footer=</Config>"
我想从XML文件,然后在剩余的项目在页眉和页脚标签之间的阅读中删除。
我试过使用sed。这一工程在Linux上,但不能在Windows
做任何事情sed -e "[email protected]%header%@@g" -i.backup xmlFile.xml any suggestions?
你的代码中有不同的变量:'header'和'xmlHeader'。 – Endoro
更改为变量为相同。但这不是问题。脚本仍然不会从xml文件中移除标题。 – Evan