我有一个非常大的文件xml。结构是这样的:
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1">Rai 1</channel>
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1 +2HD">Rai 1 +2HD</channel>
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1 +1HD">Rai 1 +1HD</channel>
我希望synk the field&#34; site_id&#34;与字段&#34; xmltv_id&#34;我需要这样的东西:
<channel update="i" site="merge-xmltv" site_id="Rai 1" xmltv_id="Rai 1">Rai 1</channel>
<channel update="i" site="merge-xmltv" site_id="Rai 1 +2HD" xmltv_id="Rai 1 +2HD">Rai 1 +2HD</channel>
<channel update="i" site="merge-xmltv" site_id=""Rai 1 +1HD" xmltv_id="Rai 1 +1HD">Rai 1 +1HD</channel>
我尝试使用命令
xml ed -u "/channel/@site_id" -x "concat(/channel/@xmltv_id)" test.xml
但我认为这是错误的:(