whats the best way to do this?

Discussion in 'ASP .Net' started by suzy, Apr 14, 2004.

  1. suzy

    suzy Guest

    hi,

    i am 3 xml files containing train timetables, the columns in each xml file
    are "departuretime" and "destination". the difference between the 3 files
    are they contain train times for 3 different train companies.

    i want to display 3 columns (1 for each company), and display (in HTML) the
    time each train departs. however, i want to break the times into hours like
    following:

    1300 Detroit 1300 Texas 1315 New York
    1330 New York 1310 Boston 1347 Washington
    1350 Las Vegas

    1410 Detroit 1400 New York 1450 Las Vegas
    1430 New York 1440 Boston 1427 Washington

    ..... etc

    What is the best way to do this. I was thinking I could load the 3 xml
    files into a dataset, but I don't know where to go from there with regards
    to using a repeater, or xsl transform, or any other way.
     
    suzy, Apr 14, 2004
    #1
    1. Advertisements

  2. You have many ways, from my view point you can use just XSLT.
     
    Maxim Kazitov, Apr 14, 2004
    #2
    1. Advertisements

  3. suzy

    WineNCheese Guest

    I'd agree with Maxim. Just combine the 3 xml documents into one, possibly
    each under a new tag as listed below, and then just use XSL.

    <Companies>
    <Company name="name1">
    <!-- contents of company 1 xml doc go in here -->
    </Company>
    <Company name="name2">
    <!-- contents of company 2 xml doc go in here -->
    </Company>
    <!-- etc -->
    </Companies>
     
    WineNCheese, Apr 15, 2004
    #3
  4. suzy

    suzy Guest

    thanks, the only thing with xsl is that i would have to loop through each
    hour, for each company.

    because remember i want the times to be broken into hourly times, which
    means i cant loop though an entire company in one go, or the layout will go
    out of sync.

    do you know if there is any way i can use a repeater and pass parameters
    into the dataset for each iteration, so i can filter out the records for the
    current hour i am looping through?

    many thanks again.
     
    suzy, Apr 15, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.