i need to convert a xml to csv using script. I found a solution with xmlstarlet but it is not available so i am returning to point 0. Here is my xml.<root>  <record>  <id_localisation>8PJ</id_localisation>  <data>   <id_client>50C</id_client>        <mail>1@mail.com</mail>      <adress>10  </adress>      <num_tel>001</num_tel>      <key>C</key>     <contact>        <name>toto</name>        <birth>01/30/009</birth>        <city>London</city>      </contact>  </data>   <data>  <id_client>25C</id_client>       <mail>2@gmaiil.com</mail>      <adress>20</adress>      <num_tel>02200</num_tel>      <key>D1</key>      <contact>        <name>tata</name>        <birth>02/08/2004</birth>        <city>Spa</city>      </contact>  </data> </record>  <record>  <id_localisation>ESP31</id_localisation>  <data>   <id_client>70D</id_client>              <mail>3@gmail.com</mail>          <adress>7Bcd</adress>          <num_tel>5555</num_tel>          <key>D2</key>      <contact>        <name>titi</name>        <birth>05/07/2014</birth>        <city>StMarine</city>      </contact>  </data>  <data>        <id_client>10D</id_client>          <mail>4@gmail.com</mail>          <adress>888</adress>          <num_tel>881.0</num_tel>          <key>D3</key>      <contact>        <name>awk</name>        <birth>05/08/1999</birth>        <city>Bahrein</city>      </contact>  </data> </record> </root>And the csv i need, note that the headers are outputid_localisation;id_client;key8PJ;50C;C 8PJ;25C;D1 ESP1;70D;D2 ESP1;10D;D3I can't install any library to help but i can use awk, perl, bash so i'am open on solution.
convert xml to csv
csv;xml