[
Lists Home |
Date Index |
Thread Index
]
Hi,
After unsuccessfully looking for an XML based feed to retrieve
baseball standings to be used at one of our websites I finally decided
maybe writing our own feed would be a simpler matter.
RSS seemed the obvious choice since it was the most widely used format.
Thanks to Dave Winer for suggesting that I start with an XML namespace
module to extend the RSS format.
So far this is what I have come up with.
Any feedback and suggestions will be greatly appreciated.
Sample script:
<rss version="2.0"
xmlns="http://backend.userland.com/rss2"
xmlns:baseball="http://fantasy-baseball.org/baseball/">
<channel>
<title>Baseball standings</title>
<link></link>
<description></description>
<item>
<title>National Leagues East Standings</title>
<link>http://fantasy-baseball.org/standing/"</link>
<description></description>
<baseball:team>
<baseball:city>Atlanta</baseball:city>
<baseball:name>Braves</baseball:name>
<baseball:win>45</baseball:win>
<baseball:loss>21</baseball:loss>
<baseball:percentage>.682</baseball:percentage>
<baseball:gamesbehind>-</baseball:gamesbehind>
<baseball:home>24-9</baseball:home>
<baseball:road>21-12</baseball:road>
<baseball:last10>8-2</baseball:last10>
<baseball:streak>W1</baseball:streak>
</baseball:team>
<baseball:team>
<baseball:city>Montreal</baseball:city>
<baseball:name>Expos</baseball:name>
<baseball:win>39</baseball:win>
<baseball:loss>29</baseball:loss>
<baseball:percentage>.574</baseball:percentage>
<baseball:gamesbehind>7.0</baseball:gamesbehind>
<baseball:home>23-11</baseball:home>
<baseball:road>16-18</baseball:road>
<baseball:last10>6-4</baseball:last10>
<baseball:streak>L3</baseball:streak>
</baseball:team>
<baseball:team>
<baseball:city>Philadelphia</baseball:city>
<baseball:name>Phillies</baseball:name>
<baseball:win>35</baseball:win>
<baseball:loss>32</baseball:loss>
<baseball:percentage>.522</baseball:percentage>
<baseball:gamesbehind>10.5</baseball:gamesbehind>
<baseball:home>18-15</baseball:home>
<baseball:road>16-17</baseball:road>
<baseball:last10>4-6</baseball:last10>
<baseball:streak>W1</baseball:streak>
</baseball:team>
<baseball:team>
<baseball:city>Florida</baseball:city>
<baseball:name>Marlins</baseball:name>
<baseball:win>32</baseball:win>
<baseball:loss>37</baseball:loss>
<baseball:percentage>.464</baseball:percentage>
<baseball:gamesbehind>14.5</baseball:gamesbehind>
<baseball:home>18-16</baseball:home>
<baseball:road>14-21</baseball:road>
<baseball:last10>5-5</baseball:last10>
<baseball:streak>L1</baseball:streak>
</baseball:team>
<baseball:team>
<baseball:city>New York</baseball:city>
<baseball:name>Mets</baseball:name>
<baseball:win>30</baseball:win>
<baseball:loss>36</baseball:loss>
<baseball:percentage>.455</baseball:percentage>
<baseball:gamesbehind>15.0</baseball:gamesbehind>
<baseball:home>16-16</baseball:home>
<baseball:road>14-20</baseball:road>
<baseball:last10>4-6</baseball:last10>
<baseball:streak>L1</baseball:streak>
</baseball:team>
</item>
</channel>
</rss>
Looking at having the feed sourced at www.fantasy-baseball.org
and then 'testing' it at www.webhostingmontreal.com to act as a client
and display the feed.
- Lou
Louai Munajim
Architecture and Development
www.bambookit.com
|