Convert Tab delimited text file to XML
<p>I'm wondering if there is an accepted method to convert a tab delimited text file to XML, so that it can be imported in Adobe Flex. I would prefer to use PHP to achieve this.</p>

<p>Thanks </p>

<p><em><strong>Edit:</em></strong></p>

<p>The tab delimited text file I am looking to convert is in the format</p>

<pre><code>Refnumber  Location    Name     Age    
123        North America    Steve    32   
</code></pre>

<p>And I am looking to convert to </p>

<pre><code>&lt;data&gt;
&lt;refnumber&gt; 123 &lt;/refnumber&gt; 
&lt;location&gt; North America &lt;/location&gt;
&lt;name&gt; Steve &lt;/name&gt;
&lt;age&gt; 32 &lt;/age&gt;
&lt;/data&gt;
</code></pre>
