title: Convert string to xml in shell script?
body: <p>I have written a script which is fetching data from database. </p>
  
  <p>Now I want to enhance that script to create a xml file with data which is return by database.</p>
  
  <p>How may i convert that string to xml file in shell script.</p>
  
  <p>script.sh </p>
  
  <pre><code>#!/bin/sh
  echo 'SELECT TABLE_NAME AS "Table Name", table_rows AS "Quant of Rows", ROUND((data_length + index_length)/1024/1024,2) AS "Total Size Mb" FROM information_schema.TABLES WHERE information_schema.TABLES.table_schema="database_name";' | mysql -u root -pmysql
  </code></pre>
  
  <p>data getting from database</p>
  
  <pre><code>"Table Name\tQuant of Rows\tTotal Size Mb\ntable_1\t2\t0.02\ntable_2\t1\t0.02\ntable_3\t142\t0.02\ntable_4\t50839\t5.03\ntable_5\t16573\t5.13\ndlr\t0\t0.02\ntable_6\t6\t0.02\ntable_7\t0\t0.03\ntable_8\t2\t0.08\ntable_9\t4\t0.02\n"
  </code></pre>
  
  <p>I want to write some logic into script which convert this string to xml file.</p>
  
  <p>How may i do that ? What are the preferred way to handle this scenario ?</p>