def parseLiveMatches()

in src/main/scala/pa/Parser.scala [224:251]


  def parseLiveMatches(s: String): List[LiveMatch] = {

    def parseTeam(team: NodeSeq): MatchDayTeam = MatchDayTeam(
      team \@ "teamID",
      team \> "name",
      (team \>> "score") map (_.toInt),
      (team \>> "htScore") map (_.toInt),
      (team \>> "aggregateScore") map (_.toInt),
      team \> "scorers"
    )

    XML.loadString(s) \ "match" map { aMatch =>
      LiveMatch(
        aMatch \@ "matchID",
        Date(aMatch \@ "date", aMatch \@ "koTime"),
        parseStage(aMatch \ "stage"),
        parseRound(aMatch \ "round"),
        aMatch \> "leg",
        aMatch \> "attendance",
        parseTeam(aMatch \ "homeTeam"),
        parseTeam(aMatch \ "awayTeam"),
        parseReferee(aMatch \ "referee"),
        parseVenue(aMatch \ "venue"),
        aMatch \> "matchStatus",
        aMatch \> "comments"
      )
    }
  }