xml to delimited text

Discussion in 'XML' started by Frank, Oct 14, 2003.

  1. Frank

    Frank Guest

    Any suggestions on coverting xml to a delimited text file? I'm
    looking for a simple client side routine to import xml into MS Access.
     
    Frank, Oct 14, 2003
    #1
    1. Advertising

  2. Frank

    Martin Boehm Guest

    <Frank> wrote in message news:

    > Any suggestions on coverting xml to a delimited text file? I'm
    > looking for a simple client side routine to import xml into MS Access.


    If you are looking for suggestions...
    Here is one: Use XSL. ;-)

    If you want more specific answers ask more specific questions.

    Martin
     
    Martin Boehm, Oct 15, 2003
    #2
    1. Advertising

  3. Frank

    Frank Guest

    A fragment of the XML document would look like the following:

    <recording>
    <video>
    <name>Gone With The Wind</name>
    <star>Clark Gable</star>
    <year_released>1950</year_released>
    </video>
    </recording>

    The resulting delimited text file would look like this:

    Gone With The Wind, Clark Gable, 1950,

    I assume that I would need an application to strip the XML tag names
    from the original document and not a process using XSLT. Is this
    correct? The commas are immaterial. All I want to do is to be able
    to feed the contents of an XML document into an Access database. What
    do I use to do this.




    On Wed, 15 Oct 2003 12:00:06 +0200, "Martin Boehm"
    <> wrote:

    ><Frank> wrote in message news:
    >
    >> Any suggestions on coverting xml to a delimited text file? I'm
    >> looking for a simple client side routine to import xml into MS Access.

    >
    >If you are looking for suggestions...
    >Here is one: Use XSL. ;-)
    >
    >If you want more specific answers ask more specific questions.
    >
    >Martin
    >
     
    Frank, Oct 18, 2003
    #3
  4. In article <>, Frank <> wrote:

    % <recording>
    % <video>
    % <name>Gone With The Wind</name>
    % <star>Clark Gable</star>
    % <year_released>1950</year_released>
    % </video>
    % </recording>

    Obviously, this data is incorrect. Everyone knows Vivien Leigh was the
    star of that movie.

    % I assume that I would need an application to strip the XML tag names
    % from the original document and not a process using XSLT.

    You can get your comma-delimited list using XSLT.

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:eek:utput method="text"/>

    <xsl:template match="video">
    <xsl:value-of select="name"/>
    <xsl:text>, </xsl:text>
    <xsl:value-of select="star"/>
    <xsl:text>, </xsl:text>
    <xsl:value-of select="year_released"/>
    <xsl:text>
    </xsl:text>
    </xsl:template>
    </xsl:stylesheet>

    If it's not clear how to deal with your real dataset from this,
    you should find some documentation and read it.

    % correct? The commas are immaterial. All I want to do is to be able
    % to feed the contents of an XML document into an Access database. What
    % do I use to do this.

    There are tools out there that stuff databases with data from XML
    documents. I'd be inclined to write a program that parses the
    XML file and load the database directly, but then I'd know how to
    go about it...
    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 19, 2003
    #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. TJS
    Replies:
    0
    Views:
    478
  2. TJS
    Replies:
    0
    Views:
    1,763
  3. TJS
    Replies:
    2
    Views:
    354
    Michael Pearson
    Feb 6, 2004
  4. RyanL
    Replies:
    6
    Views:
    690
    Paul McGuire
    Aug 28, 2007
  5. Gibson
    Replies:
    2
    Views:
    1,413
    Gibson
    Nov 19, 2008
Loading...

Share This Page