0% found this document useful (0 votes)
86 views1 page

Structuring Baseball Statistics in XML

This chapter discusses structuring baseball statistics and other data using XML. It will develop an example showing how a large list of statistics might be stored in XML, which has uses like displaying on a web page or analyzing particular seasons. The chapter examines 1998 MLB statistics, when Mark McGwire and Sammy Sosa broke the single-season home run record. It explores how expansion and weaker pitching that year may have contributed to outstanding individual and team performances like McGwire/Sosa and the Yankees' 114-win season.

Uploaded by

Sai Kuamr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views1 page

Structuring Baseball Statistics in XML

This chapter discusses structuring baseball statistics and other data using XML. It will develop an example showing how a large list of statistics might be stored in XML, which has uses like displaying on a web page or analyzing particular seasons. The chapter examines 1998 MLB statistics, when Mark McGwire and Sammy Sosa broke the single-season home run record. It explores how expansion and weaker pitching that year may have contributed to outstanding individual and team performances like McGwire/Sosa and the Yankees' 114-win season.

Uploaded by

Sai Kuamr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3236-7 ch04.F.

qc

6/29/99

1:04 PM

Page 59

C H A P T E R

Structuring Data

n this chapter, we will develop a longer example that shows


how a large list of baseball statistics and other similar data
might be stored in XML. A document like this has several
potential uses. Most obviously it can be displayed on a Web
page. It can also be used as input to other programs that want
to analyze particular seasons or lineup. Along the way, youll
learn, among other things, how to mark up the data in XML,
why XML tags are chosen, and how to prepare a CSS style
sheet for a document.

Examining the Data


As I write this (October, 1998), the New York Yankees have just
won their 24th World Series by sweeping the San Diego Padres
in four games. The Yankees finished the regular season with
an American League record 114 wins. Overall, 1998 was an
astonishing season. The St. Louis Cardinals Mark McGwire
and the Chicago Cubs Sammy Sosa dueled through September
for the record, previously held by Roger Maris, for most home
runs hit in a single season since baseball was integrated. (The
all-time major league record for home runs in a single season
is still held by catcher Josh Gibson who hit 75 home runs in
the Negro league in 1931. Admittedly, Gibson didnt have to
face the sort of pitching Sosa and McGwire faced in todays
integrated league. Then again neither did Babe Ruth who was
widely (and incorrectly) believed to have held the record until
Roger Maris hit 61 in 1961.)
What exactly made 1998 such an exciting season? A cynic
would tell you that 1998 was an expansion year with three
new teams, and consequently much weaker pitching overall.
This gave outstanding batters like Sosa and McGwire and
outstanding teams like the Yankees a chance to really shine
because, although they were as strong as theyd been in
1997, the average opponent they faced was a lot weaker. Of
course true baseball fanatics know the real reason, statistics.

In This Chapter
Examining the data
XMLizing the data
The advantages of
the XML format
Preparing a style
sheet for document
display

You might also like