1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

generate webpage from configuration file

Discussion in 'JavaScript' started by oredge, Feb 4, 2016.

  1. #1
    Hi,

    I'm building a website wich will give realtime information to journalists during bike races. Bikeraces don't allways have the same format (time trial, mountain stage, intermediate sprint) so i can't allways display the same modules on my page.
    I've created an .xml wich describes the details of every different race.

    Now i'm looking for the best way to tackle page setup/generation. For example if there's an intermediate sprint during the race the module wich shows the result of that sprint needs to be generated/displayed, if it is a timetrial on the other hand i want to display starttimes of the riders and no intermediate results...

    I'm sure someone somewhere has already solved this so pointing me in the right direction will already be a great help!
    When i type the keywords into Google it keeps giving me unusable results.

    Thanks for any help/guidance,

    oredge
     
    oredge, Feb 4, 2016 IP
  2. Quadropus

    Quadropus Active Member

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    Digital Goods:
    1
    #2
    Check out this package, which turns XML into JS:
    https://github.com/Leonidas-from-XIV/node-xml2js

    Since each race has a different format, you'll need to be prepared to handle them on the backend.

    Otherwise, why not just start a blog and upload the XML files as attachments?
     
    Quadropus, Feb 18, 2016 IP