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. Advertising

  2. You have many ways, from my view point you can use just XSLT.


    "suzy" <> wrote in message
    news:cvgfc.3409$...
    > 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.
    >
    >
     
    Maxim Kazitov, Apr 14, 2004
    #2
    1. Advertising

  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.


    "WineNCheese" <> wrote in message
    news:...
    > 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>
    >
    >
     
    suzy, Apr 15, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guy Bradley

    whats the best way to?

    Guy Bradley, Aug 5, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    332
    Jay Warmack, MCAD
    Aug 5, 2003
  2. Replies:
    1
    Views:
    415
    Peter Flynn
    Mar 22, 2005
  3. Towner
    Replies:
    18
    Views:
    1,000
    Vince Morgan
    Nov 8, 2006
  4. Steve

    whats the best way to do this?

    Steve, Jul 12, 2007, in forum: ASP .Net
    Replies:
    19
    Views:
    514
    Juan T. Llibre
    Jul 12, 2007
  5. Greg
    Replies:
    5
    Views:
    373
Loading...

Share This Page