Home/Guides/Data Hub

Read an XML file or URL

If your scoring software writes an XML file, ScoreCastr can watch it and update the scorebug whenever it changes, from a file on your computer or a file online.

Updated 5 min readPro

Plenty of scoring and scoreboard software saves the game state to an XML file as it runs. The XML File Monitor reads that file and turns its tags into score, clock and stat updates on your match. You choose where the file lives, match each XML tag to a ScoreCastr field once, and the feed runs on its own from there.

Short versionOpen ScoreCastr on the Scoring tab, go to Other Sources and click Set up XML Feed. Pick Local File (Chrome, Edge, Brave or Opera) or Cloud URL, detect the fields, check the mapping and click Confirm & Enable. Keep the ScoreCastr tab open for a local file.

Local file or cloud URL

Local File Cloud URL
Where the file is On the computer running the browser Online, at a public web address
How often it's read Checked 20 times a second, sent when it changes Every 1 to 60 seconds (2 by default)
Browser Chrome, Edge, Brave or Opera Any
Must stay open A ScoreCastr tab in that browser Nothing: ScoreCastr's server reads the URL
Best for Running clocks: football, basketball, soccer, ice hockey Sports without a running clock, or a file on another computer

For football, basketball, soccer and ice hockey, the setup page warns that cloud URLs lag 1 to 3 seconds and suggests a local file.

The XML File Monitor needs the Pro plan. A match uses the XML File Monitor or the webhook, not both: setting up XML on a match that has the webhook on replaces it.

Open the XML setup page

  1. On the match's Scoring tab, click ScoreCastr.
  2. Open Other Sources and click Set up XML Feed on the XML File Monitor card. (Or, on the Scoreboard OCR tab, choose XML File Monitor under Connection Method and click Open XML Setup.)

The XML Feed Setup page opens. Back and Done return to the dashboard.

Set up a local file

  1. Under Source, click Local File.
  2. Click Pick XML file and choose the file your software writes.
  3. Allow the browser to read the file if it asks.
  4. ScoreCastr reads the file and fills the Field Mapping table. Check it (see below).
  5. Click Confirm & Enable. You'll see "XML feed enabled".

Firefox and Safari can't watch a local file. They show "Your browser does not support local file watching." The file is remembered in this browser on this computer only; on another computer, pick it again.

Keep at least one ScoreCastr tab open in that browser for the whole game, signed in. The feed runs in the browser, not on the setup page itself, so you can go back to the dashboard. Closing the browser stops it.

Set up a cloud URL

  1. Under Source, click Cloud URL.
  2. Paste the file's address into Cloud URL and click Detect Fields.
  3. Set Polling Interval (s), from 1 to 60 seconds.
  4. Check the Field Mapping table.
  5. Click Confirm & Enable.

The address has to be public (http or https), with no sign-in, and it has to return the XML file itself. ScoreCastr doesn't follow redirects, so a share link that forwards to another address fails. If Detect Fields fails, use the file's direct download link. When the file hasn't changed since the last read, ScoreCastr skips it.

The field mapping table

Each row is one XML tag, shown as its path in the file (for example game.home.score), with a sample value and a dropdown.

  • Suggestions: ScoreCastr fills in a match for tags it recognizes, like home_score, quarter, shotclock or visitorscore. Check each one.
  • The dropdown lists only fields for this match's sport, grouped as Score, Clock & Period, Teams, Players, Stats and Other. The Stats group is optional and drives stat popups and flags.
  • Ignore (do not import) keeps a tag out of the feed for good.
  • The filter shows Needs attention (unmapped tags) by default. Switch to All fields or Mapped only, or use Search tags….
Watch outThe page says Unmapped tags are ignored, but ScoreCastr still tries an unmapped tag by its own name, so a tag named like a field can still change the match. To be sure a tag is never used, set it to Ignore (do not import).

To change the mapping later, open the setup page, edit the rows and click Save Mapping.

Watch the feed

After you enable it, the setup page shows a Live Monitor (Status, Updates received, Last server update, Last file read and Source) and a Recently Changed list of values as they change. For a local file you can Pause and Resume here.

On the Control Dashboard, an XML pill sits next to the status dot:

  • Green, Live: the feed is updating.
  • Amber, stale: no update for 30 seconds, which is normal while a clock is stopped.
  • Red, error: the feed has failed, lost permission or is paused.

Click the pill for XML Feed Health, with each feed's last update and buttons to Re-grant, Resume, Pause, Retry or Open its setup page. The Other Sources tab also shows the feed, with "Feed appears stale" if nothing has changed for a few minutes during a live game.

Resume after a restart

Browsers drop file permission when the tab closes, the computer restarts or the tab sleeps. When that happens, the setup page shows a banner saying your XML feed needs to resume.

  1. Open the XML setup page (or click the red XML pill).
  2. Click Resume Feed (or Re-grant) and allow access. Your saved file and mapping are reused.

If it says there's no saved file on this device, click Re-pick file, choose the same file, then click Resume Feed.

Turn it off

Click Disable XML Feed on the setup page, or Disable Feed in Other Sources. Do this after every game: while the feed is on, the match counts toward your plan's active match limit. Disabling deletes the mapping, so you'll map the file again next time.

Checklist

  • Local File for clock sports, in Chrome, Edge, Brave or Opera
  • Cloud URL public and pointing straight at the file
  • Every row mapped or set to Ignore, then Confirm & Enable
  • Green XML pill on the dashboard before you go on air
  • ScoreCastr tab left open on the scoring computer (local file)
  • Feed disabled after the game