ballybeg
Member
Hi all. Looking for some guidance so I can attack my latest project the best way from the outset.
I have an XML file that has a basic hierarchical structure about horse racing. It has a summary of the tracks, some data about each track, then a list of all the races at each track racing that day. So lets say there are 10 tracks, and for each track there are 8 races. This is a snapshot of the data....
I have written the code to pull down the data into a data store, but I dont know the BEST way to put the data into a set of tables. MY first thought was to traverse the nodes and add rows into tables but I figure there must be a native VB process that reads the xml and puts it into the the appropriate table.
The guidance I am looking for is how to code up the process for getting the data into a set of tables that match the xml. So lets say I have a Summary table, I would like all the data about each track to go into that table. Then I would have a Races table and have the data for each race go into that.
I'm really stuck at how to attack this thing. What I have done already is import the xml into Access to create the tables (which was a breeze!) and then link that data source to my project. So I have the tables already built.
However I figure there must be a way to create the tables on the fly directly from the XML...I would prefer to learn how to do that as there are other xml files I need to use as well.
All help greatly appreciated.
ballybeg
I have an XML file that has a basic hierarchical structure about horse racing. It has a summary of the tracks, some data about each track, then a list of all the races at each track racing that day. So lets say there are 10 tracks, and for each track there are 8 races. This is a snapshot of the data....
HTML:
-<Meetings xmlns="" Jurisdiction="VIC">
-<Summary MID="MR_20110801">
<VenueName>ECHUCA (VIC)</VenueName>
<Type>R</Type>
<Events>10</Events>
<Track>DEAD </Track>
<Weather>FINE </Weather>
-<Races>
-<Race RID="MR_20110801_01">
<Name>BORDER INN HOTEL/MOTEL 3YO MDN</Name>
<Distance>1009m </Distance>
<Class>MDN </Class>
<RunnerNo Acceptors="13">11</RunnerNo>
<JumpTime>11:08</JumpTime>
<TimeToJump>-10:18:08</TimeToJump>
<RaceStatus>Processed</RaceStatus></Race>
-<Race RID="MR_20110801_02">
<Name>PILLAR OF HERCULES 3YO MDN PLT</Name>
<Distance>1009m </Distance>
<Class>MDN </Class>
<RunnerNo Acceptors="13">8</RunnerNo>
<JumpTime>11:38</JumpTime>
<TimeToJump>-09:48:08</TimeToJump>
<RaceStatus>Processed</RaceStatus>
</Race>
etc......
I have written the code to pull down the data into a data store, but I dont know the BEST way to put the data into a set of tables. MY first thought was to traverse the nodes and add rows into tables but I figure there must be a native VB process that reads the xml and puts it into the the appropriate table.
The guidance I am looking for is how to code up the process for getting the data into a set of tables that match the xml. So lets say I have a Summary table, I would like all the data about each track to go into that table. Then I would have a Races table and have the data for each race go into that.
I'm really stuck at how to attack this thing. What I have done already is import the xml into Access to create the tables (which was a breeze!) and then link that data source to my project. So I have the tables already built.
However I figure there must be a way to create the tables on the fly directly from the XML...I would prefer to learn how to do that as there are other xml files I need to use as well.
All help greatly appreciated.
ballybeg