...

View Full Version : get xml using DOM



ShaF
09-10-2008, 07:19 AM
Hi Guys

I have the following xml:


<AllMail>
<mail>
<id>1</id>
<title>MyMail</title>
<contact>
<id>10</id>
<name>John Mop</name>
<email>sss@sss.com</email>
</contact>
<contact>
<id>13</id>
<name>Jop Gop</name>
<email>4325@sss.com</email>
</contact>
</mail>
<mail>
<id>4</id>
<title>MyMailtotoy</title>
<contact>
<id>4</id>
<name>Jacn Beat</name>
<email>1111@sss.com</email>
</contact>
</mail>
</AllMail>

I want all the content between each <mail></mail> tag to be in a table row each (see example below for further clarification). How can I do this ? Note that the content will be dynamic.


<table>
<tr>
<td id="id">1</td>
<td id="title">MyMail</td>
<td id="contacts">John Mop, Jop Gop</td>
</tr>
<tr>
<td id="id">4</td>
<td id="title">MyMailtotoy</td>
<td id="contacts">Jacn Beat</td>
</tr>
</table>



Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum