Question XML to Datagridview

cougs

New member
Joined
Feb 14, 2010
Messages
1
Programming Experience
Beginner
Suffering from information overload at the moment and can't seem to get my head around this problem. I've written the problem as comments in my xml file below. Hope it makes sense.

VB.NET:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rest/apiStylesheet.xsl" ?>
<channelHistory>
    <channel>
        <games>
            <game>
                <markets>
				
		<!-- Each market id represents a row, market id will be the primary key -->
		<!-- Each row will have 5 columns - ID, Hand 1, Hand 2, Hand 3, Hand 4 -->
		<!-- The Hand1 - Hand 4 columns will contain the values held in <status> -->
		<!-- The first row will therefore look like - 1234,LOSER,WINNER,LOSER,LOSER -->
		<!-- The second row will look like this - 5678,WINNER,LOSER,LOSER,LOSER -->
					
                    <market id="1234">
                        <selections>
                            <selection>
                                <name>Hand 1</name>
                                <status>LOSER</status>
                            </selection>
                            <selection>
                                <name>Hand 2</name>
                                <status>WINNER</status>
                            </selection>
                            <selection>
                                <name>Hand 3</name>
                                <status>LOSER</status>
                            </selection>
                            <selection>
                                <name>Hand 4</name>
                                <status>LOSER</status>
                            </selection>
                        </selections>
                    </market>
		    <market id="5678">
                        <selections>
                            <selection>
                                <name>Hand 1</name>
                                <status>WINNER</status>
                            </selection>
                            <selection>
                                <name>Hand 2</name>
                                <status>LOSER</status>
                            </selection>
                            <selection>
                                <name>Hand 3</name>
                                <status>LOSER</status>
                            </selection>
                            <selection>
                                <name>Hand 4</name>
                                <status>LOSER</status>
                            </selection>
                        </selections>
                    </market>
                </markets>
            </game>
        </games>
    </channel>
</channelHistory>
 
Back
Top