How do I select and edit an xml node with xmlstartlet?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Here I'm selecting the node: $ xmlstarlet sel -t -c "/configuration/property[name='http.agent.name']"/value conf/nutch-default.xml <value/> This doesn't edit it: $ xmlstarlet edit "/configuration/property[name='http.agent.name']"/value -v 'test' conf/nutch-default.xml I/O warning : failed to load external entity "/configuration/property[name='http.agent.name']/value" What would be an xmlstartlet command that does change the change? AFAIK -x is not supported in xmlstartlet yet. I'm working on conf/nutch-default.xml $ xmlstarlet ed --help