Hi,
I have following text file. I want to convert it into the below HTML format. Kindly help.
Input Text File
Header 1
=======
Name:***
Age:***
Address:***
Work Phone:***
Email:***
Mobile:***
Country:***
City:***
Pincode:***
some text here ****
Header 2
=======
Name:***
Age:***
Address:***
Work Phone:***
Email:***
Mobile:***
Country:***
City:***
Pincode:***
some text here ****
Header 3
=======
Name:***
Age:***
Address:***
Work Phone:***
Email:***
Mobile:***
Country:***
City:***
Pincode:***
some text here ****
I want to convert the above plain text file to a html file with a table with a header row containing my headers from text file and the rest of the details in the corresponding columns. Here I have "====" as the delimiter for my headers. The ** represents my data which could be several lines of text.
<p>
<p>
</p>
</p>
<table border="1" cellpadding="0" width="1184">
<tbody>
<tr>
<td valign="top">
<pre>Header 1 </pre>
</td>
<td valign="top">
<pre>Header 2</pre>
</td>
<td valign="top">
<pre>Header 3</pre>
</td>
<td valign="top">
<pre>Header 4</pre>
</td>
</tr>
<tr>
<td valign="top">
<pre>Name:***</pre>
<pre>Age:***</pre>
<pre>Address:***</pre>
<pre>Work Phone:***</pre>
<pre>Email:***</pre>
<pre>Mobile:***</pre>
<pre>Country:***</pre>
<pre>City:***</pre>
<pre>Pin code:***</pre>
<pre><p> </p></pre>
<pre>some text here ****</pre>
</td>
<td valign="top">
<pre>Name:***</pre>
<pre>Age:***</pre>
<pre>Address:***</pre>
<pre>Work Phone:***</pre>
<pre>Email:***</pre>
<pre>Mobile:***</pre>
<pre>Country:***</pre>
<pre>City:***</pre>
<pre>Pin code:***</pre>
<pre><p> </p></pre>
<pre>some text here ****</pre>
</td>
<td valign="top">
<pre>Name:***</pre>
<pre>Age:***</pre>
<pre>Address:***</pre>
<pre>Work Phone:***</pre>
<pre>Email:***</pre>
<pre>Mobile:***</pre>
<pre>Country:***</pre>
<pre>City:***</pre>
<pre>Pin code:***</pre>
<pre><p> </p></pre>
<pre>some text here ****</pre>
</td>
<td valign="top">
<pre>Name:***</pre>
<pre>Age:***</pre>
<pre>Address:***</pre>
<pre>Work Phone:***</pre>
<pre>Email:***</pre>
<pre>Mobile:***</pre>
<pre>Country:***</pre>
<pre>City:***</pre>
<pre>Pin code:***</pre>
<pre><p> </p></pre>
<pre>some text here ****</pre>
</td>
</tr>
</tbody>
</table>