xml to delimited text

F

Frank

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

Martin Boehm

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
 
F

Frank

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

Patrick TJ McPhee

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

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top