CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   XML (http://www.codingforums.com/forumdisplay.php?f=3)
-   -   Simple XML database (http://www.codingforums.com/showthread.php?t=273126)

DarkMMM 09-14-2012 01:54 PM

Simple XML database
 
How do i display this .xml in .html or .asp in a basic table.

Code:

<category>
        <event name="Match1" date="20120908">
                <bettype bet-start-date="20120908" bet-start-time="1700">
                        <bet had-value="HOME" name="Homewin" price="8/13"/>
                        <bet had-value="DRAW" name="Draw" price="5/2"/>
                        <bet had-value="AWAY" name="Awaywin" price="9/2"/>
                </bettype>
        </event>
        <event name="Match2" date="20120909">
                <bettype bet-start-date="20120909" bet-start-time="1600">
                        <bet had-value="HOME" name="Homewin" price="13/10"/>
                        <bet had-value="DRAW" name="Draw" price="85/40"/>
                        <bet had-value="AWAY" name="Awaywin" price="2/1"/>
                </bettype>
        </event>
</category>


on to something like this


Code:

<table border="1" width="50%">
        <tr>
                <td>&nbsp;</td>
                <td>Home win</td>
                <td>Draw</td>
                <td>Away Win</td>
        </tr>
        <tr>
                <td>Match1</td>
                <td>8/13</td>
                <td>5/2</font></td>
                <td>9/2</font></td>
        </tr>
        <tr>
                <td>Match2</td>
                <td>13/10</font></td>
                <td>85/40</font></td>
                <td>2/1</font></td>
        </tr>
</table>



All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.