title: How to convert xml node data into string in QT
body: <p>I have xml file in my local machine. The xml file format is like:</p>
  
  <pre><code>&lt;string&gt;
          &lt;Data&gt;
                &lt;Name&gt;Sanket&lt;/Name&gt;
                &lt;Number&gt;0987654321&lt;/Number&gt;
                &lt;Address&gt;India&lt;/Address&gt;
          &lt;/Data&gt;
          &lt;Data&gt;
                &lt;Name&gt;Rahul&lt;/Name&gt;
                &lt;Number&gt;0987654321&lt;/Number&gt;
                &lt;Address&gt;Maharashtra&lt;/Address&gt;
          &lt;/Data&gt;
  &lt;/string&gt;
  </code></pre>
  
  <p>I want to convert this XML file data into String format. Like:</p>
  
  <p><code>Sanket    0987654321    India
   Rahul     0987654321    Maharashtra</code></p>
  
  <p>What is the easiest way to convert this data in QT using c++.
  I am new in that, so please can anyone suggest me some sample code for this?
  Thank you in advance.</p>
  
  <p>I tried following code, but that not work for me:</p>
  
  <pre><code>void parseFile()
  {
  QList&lt;QList&lt;QString&gt; &gt; dataSet;
  
  QString lastError = "";
  QFile inFile("test.xml");
  if (inFile.open(QIODevice::ReadOnly))
  {
      QTextStream fread(&amp;inFile);
      long totalSize = inFile.size();
      QString line;
      while(!fread.atEnd())
      {
          line = fread.readLine();
          QList&lt;QString&gt; record = line.split(QString::KeepEmptyParts);
          dataSet.append(record);
  
      }
       qDebug()&lt;&lt;dataSet;
  }else{
      lastError = "Could not open "+test.xml+" for reading";
  }
  }
  </code></pre>