I have an XML with the following structure:
<database>
<name>Test</name>
<description>A test dataset</description>
<enrtry_count>10289</entry_count>
<keywords>some keyword</keywords>
<url>url.com</url>
<entries>
<id>muKO</id>
<name>B6.129S2-Ighm<tm1Cgn>/CgnOrl</name>
<description>description here</description>
<date>2022-09-25 21:02:12</date>
<repository>rep name</repository>
<full_dataset_link>link_to_dataset.com</full_dataset_link>
</entry>
.
.
.
.
</database>
Now from this file I need to change <id>muKO</id> to <entry id="muKO">.
This is needed in the whole file so I was wandering how to read line by line the XML file and modify the lines that have the structure <id>some_id</id>.
Thank you for the help.
If you have a valid xml file like my edited example you can set the tag attribute and than remove the id-tag:
Output: