Converting XML to CSV

Discussion in 'Perl Misc' started by Mark Drummond, Jun 8, 2006.

  1. I have an application, Garmin Training Centre, which logs exercise data
    from my Garmin GPS/HRM. While the Training Centre provides all kinds of
    get data analysis, it does not do everything I like. I would like to be
    able to pull my exercise data into a spreadsheet or even a database
    where I can do more analysis.

    The Training Center software allows me to export my data, but only in an
    XML format. I started writing a script to convert this to a CSV but I am
    wondering if using something like XML-Parser would make my life easier.
    I haven't done any work with XML files before.

    Any suggestions?

    Mark
     
    Mark Drummond, Jun 8, 2006
    #1
    1. Advertising

  2. Mark Drummond

    J. Gleixner Guest

    Mark Drummond wrote:
    [...]
    > to export my data, but only in an
    > XML format. I started writing a script to convert this to a CSV but I am
    > wondering if using something like XML-Parser would make my life easier.
    > I haven't done any work with XML files before.
    >
    > Any suggestions?


    Your first step would be to search CPAN (http://search.cpan.org/_
    for possible modules.

    Put in "XML CSV" and you'll find XML::CSV.

    Could also look at XML::Simple, to parse the XML into a data
    structure.
     
    J. Gleixner, Jun 8, 2006
    #2
    1. Advertising

  3. Mark Drummond

    DJ Stunks Guest

    Mark Drummond wrote:
    > I have an application, Garmin Training Centre, which logs exercise data
    > from my Garmin GPS/HRM. While the Training Centre provides all kinds of
    > get data analysis, it does not do everything I like. I would like to be
    > able to pull my exercise data into a spreadsheet or even a database
    > where I can do more analysis.
    >
    > The Training Center software allows me to export my data, but only in an
    > XML format. I started writing a script to convert this to a CSV but I am
    > wondering if using something like XML-Parser would make my life easier.
    > I haven't done any work with XML files before.
    >
    > Any suggestions?


    Someone else asked this exact question earlier this week and I'll tell
    you what I told him - just open the .xml in Excel 2003 and save it as a
    ..csv or .xls or whatever you like.

    I love Perl, but if your spec is really this simple there's no need to
    wield the big hammer...

    -jp
     
    DJ Stunks, Jun 8, 2006
    #3
    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. jkflens
    Replies:
    2
    Views:
    1,498
    jkflens
    May 30, 2006
  2. Michal Mikolajczyk
    Replies:
    0
    Views:
    659
    Michal Mikolajczyk
    Feb 13, 2004
  3. Skip Montanaro
    Replies:
    0
    Views:
    722
    Skip Montanaro
    Feb 13, 2004
  4. Tintin92
    Replies:
    1
    Views:
    1,717
    Andrew Thompson
    Feb 14, 2007
  5. jliu66
    Replies:
    0
    Views:
    517
    jliu66
    Oct 19, 2007
Loading...

Share This Page