我具有使用ruby脚本编辑xml文件的以下要求。
有人可以帮我吗
Input file:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="60000"
redirectPort="8443" />
-->
Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- An dskggmsdsd >
Requirement:
方案1:如果上述文件在连接器行中不可用,请添加“ connectionTimeout =“ 20000”“
方案2:如果connectionTimeout =“ 20000”可用,并且值不同于20000,则将该值替换为20000
场景3:如果在所有连接器位置都可以使用connectionTimeout =“ 20000”,则不要更改任何内容
预先感谢