<annotation>
<folder>cars_train</folder>
<filename>00001.jpg</filename>
<path>Users/hantaoliu/Documents/Research/cars_train/.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
The text above is one of the XML file I want to update. I have 7k XML files and I want the path of them to be:
Users/hantaoliu/Documents/Research/cars_train/$@.jpg
$@
corresponds to the name of the input file. For example, if the input file is 00001.xml
, I want the path to be:
Users/hantaoliu/Documents/Research/cars_train/00001.jpg
I'm using xmlstarlet
, but I'm not able to figure it out?