Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5950101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:20:45+00:00 2026-05-22T17:20:45+00:00

I have a scoreboard on my website that gets scores from an XML file.

  • 0

I have a scoreboard on my website that gets scores from an XML file. It’s very easy for others to update, except for highlighting the winner.

This is a sample game from the XML file:

<game>
<month>05</month><day>25</day><year>11</year>
<type>Football</type>
<homeName>Wildcats</homeName><homeScore>45</homeScore><homeWinner></homeWinner>
<awayName>Bruins</awayName><awayScore>55</awayScore><awayWinner>y</awayWinner>
</game>

As you can see, I want them to simply check the winner. However, when it loads in HTML, I want the y to be replaced with an arrow image.

It’s a Spry scoreboard, so here’s the relevant HTML:

<script type="text/javascript">
var dsScoreboard = new Spry.Data.XMLDataSet("scoreboard.xml", "scoreboard/game", {sortOnLoad: "date", sortOrderOnLoad: "descending"});
dsScoreboard.setColumnType("date", "date");
</script>

<div spry:region="dsScoreboard">
<table class="scoreboard" cellspacing="15" cellpadding="0" border="0">
    <tr>
    <td spry:repeat="dsScoreboard">
        <table class="game" cellspacing="0" cellpadding="0" border="0">
        <tr>
        <td class="date month">{month}</td>
        <td class="type" colspan="3">{type}</td>
        </tr>
        <tr>
        <td class="date day">{day}</td>
        <td class="winner">{awayWinner}</td>
        <td class="name">{awayName}</td>
        <td class="score">{awayScore}</td>
        </tr>
        <tr>
        <td class="date year">{year}</td>
        <td class="winner">{homeWinner}</td>
        <td class="name">{homeName}</td>
        <td class="score">{homeScore}</td>
        </tr>
        </table>
    </td>    
    </tr>
</table>
</div>

So the output HTML for the winner cell should be something like:

<td class="winner"><img src="arrow.png" /></td>

instead of:

<td class="winner">y</td>

Can this be easily done? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:20:46+00:00Added an answer on May 22, 2026 at 5:20 pm

    What you want is a spry:choose. I have never used spry, but it’s something vaguely like this:

    <td class="winner">
      <span spry:choose="spry:choose">
        <img src="arrow.png" spry:when="'{homeWinner}' == 'y'" />
        <span spry:default="spry:default"></span>
      </span>
    </td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a scoreboard, i store the scores in an xml file. (WPF application) Of
I have a scoreboard app that has many UITextFields that holds the scores for
I am trying to extract numbers from a typical scoreboard that you would find
I have the following code that is to be propperly converted to cython: from
I have a MySQL query that fetches a numeric value VARCHAR (20) from a
I have a .storyboard file whose orientation I need to change from portrait to
I have a storyboard that runs forever with autoreverse for lets say 10 seconds.
I have a table based off Sam's Teach Yourself iOS Development's FlowerViewController , that,
I've reviewed many websites and youtube videos that have IOS 5 storyboarding information. Most
I'm displaying a scoreboard from a SQLite table in my app. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.