I’m working on a Flash-based information-only NCAA men’s basketball bracket that pulls from a static XML file. Here’s the basic structure of the XML:
<tournament>
<region number="0">
<round number="0">
<game>
<team1>Wake Forest</team1>
<team1_seed>1</team1_seed>
<team1_score>75</team1_score>
<team2>Duke</team2>
<team2_seed>16</team2_seed>
<team2_score>40</team2_score>
</game>
<game>
<team1>Syracuse</team1>
<team1_seed>2</team1_seed>
<team1_score>60</team1_score>
<team2>Notre Dame</team2>
<team2_seed>15</team2_seed>
<team2_score>66</team2_score>
</game>
<game>
<team1>Villanova</team1>
<team1_seed>3</team1_seed>
<team1_score>89</team1_score>
<team2>Texas Tech</team2>
<team2_seed>14</team2_seed>
<team2_score>88</team2_score>
</game>
<game>
<team1>Georgetown</team1>
<team1_seed>4</team1_seed>
<team1_score>77</team1_score>
<team2>Florida Southern</team2>
<team2_seed>13</team2_seed>
<team2_score>56</team2_score>
</game>
<game>
<team1>Pittsburgh</team1>
<team1_seed>5</team1_seed>
<team1_score>70</team1_score>
<team2>Alabama</team2>
<team2_seed>12</team2_seed>
<team2_score>73</team2_score>
</game>
<game>
<team1>North Carolina</team1>
<team1_seed>6</team1_seed>
<team1_score>74</team1_score>
<team2>Dartmouth</team2>
<team2_seed>11</team2_seed>
<team2_score>56</team2_score>
</game>
<game>
<team1>NC State</team1>
<team1_seed>7</team1_seed>
<team1_score>66</team1_score>
<team2>Penn State</team2>
<team2_seed>10</team2_seed>
<team2_score>60</team2_score>
</game>
<game>
<team1>Miami</team1>
<team1_seed>8</team1_seed>
<team1_score>79</team1_score>
<team2>Missouri</team2>
<team2_seed>9</team2_seed>
<team2_score>66</team2_score>
</game>
</round>
</region>
</tournament>
There would be progressively smaller rounds w/ fewer teams as you drilled down through a region, then a new region would start with more data.
My question is – how best to group/parse this data? Do I create an object array down to the game level and then start having game properties in an object array? I will most likely be willing to ditch the seed and the score in the interest of making the whole thing simpler.
Thoughts and suggestions are welcome.
IronChefMorimoto