我正在尝试使用 --inplace 全局选项更新一个 xml 标签,如下所示
xml ed --inplace -N x="http://java.sun.com/xml/ns/j2ee" -u "//x:web-app/x:filter/x:init-param/x:param-value" -v "/cuadmin/showRecovery.do" WEB-INF/web.xml
以上是给我错误
**I/O warning : failed to load external entity "x=http%3A//java.sun.com/xml/ns/j2ee"**
我试图修改的 xml 如下所示:-
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>recoveryRedirectFilter</filter-name>
<filter-class>ClassName</filter-class>
<init-param>
<param-name>somename</param-name>
<param-value>Someurl.do</param-value>
</init-param>
</filter>
</web-app>