Knowledgebase: General
What is SportsML?
Posted by Casey Trauer on 04 April 2013 11:02 PM

XML Team is the leading developer of SportsML, an XML standard designed to be consistent across sports, flexible, comprehensive and extensible.

Here we are going to highlight some of its basic features. If you need more information, check out the following resources:

 

SportsML features

Every SportsML document shares the same basic framework, regardless of what document type or what sport is covered.

Document metadata

All documents have a root of either sports-content or sports-content-set.

sports-content-set: Returned by web service queries and contains attributes that describe the query and query date.
sports-content: The root of the actual document. There may be multiple sports-content elements in a sports-content-set. 

Here are relevant metadata attributes contained by sports-content (using XPath notation):

  • sports-content/@path-id: follows this format: {sport-name}/{league-key}/{document-class}/{doc-id}  
  • sports-content/sports-metadata/@date-time: Timestamp for when file was sent by content provider.  
  • sports-content/sports-metadata/@doc-id: File name, without the .xml extension  
  • sports-content/sports-metadata/@fixture-key: This metadata describes the type of document, such as event-stats (box scores) or schedule-single-team (team schedules). See the Content Showcase for more documentation.
  • sports-content/sports-metadata/sports-title: Title for file  
  • sports-content/sports-metadata/sports-content-codes: Contains useful metadata for describing which leagues, teams, etc. are described in the file. Used by the database to make file associations.

Event metadata

Any file that has event information — recaps, box scores, schedules — are likely to have the sports-event element. Each event is described by the following attributes:

  • sports-event/event-metadata/@event-key: The identifier for the game, shared across documents.
  • sports-event/event-metadata/@event-status: usually including the values pre-event, mid-event, post-event (others may apply)
  • sports-event/event-metadata/@start-date-time: A timestamp describing event time.
Other attributes may describe event duration or site information, but that is not necessarily consistent for all sports or docs. 

Team metadata/Scores

  • team/team-metadata/@team-key: universal identifier for each team. See documentation on your client page for reference. Team key information is often updated. 
  • team/team-metadata/@alignment: Home or away, if applicable.
  • team/team-metadata/name/@first and @last: Display name for team
  • team/team-stats/@score: Current or final score
  • team/team-stats/@event-outcome: win, loss, tie, etc.
  • team/team-stats/sub-score/@period-value and @score: linescore information

Player metadata

  • team/player/player-metadata/@player-key: universal identifier for each player. The best documentation is the latest roster file for each team or league. Ask us if you need help rounding this up as they are not sent every day.
  • team/player/player-metadata/name/@first @last or @full: Player name

Sports-specific data

Much of the statistical data live in sport-specific nodes. The best documentation for this data is either sample files or the DTD/schema files found at SportsML.org.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako Resolve