Solved

convert tab-delimited text file to XML based on a schema

Posted on 2009-04-02
1
989 Views
Last Modified: 2012-05-06
I have a tab-delimited text file for a client that is filled with data.  A customer gave us an .XSD file for the schema of an XML file.  They want us to convert the tab-delimited data text file to an XML file based on the schema they gave us.  And of course, the schema has extra field names, and some of them are different than ours.

How can we do this?  Is there an open-source solution?  We are VB.NET/SQL programmers here.  We just want to take the text file we normally send them and convert it to an XML file based on the schema they gave us.  I'm kind of new to XML! :)
0
Comment
Question by:redmission
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 24054219
I don't think you'll find any off-the-shelf way to do this, you're going to have to do it in code.

There's a sample of converting a CSV file to XML using transforms located at http://www.thescarms.com/dotnet/XSLT.aspx. It probably wouldn't be too tough to modify the XSLT file to work with your tab-delimited source file. The approach used by this solution is a nice one because if you have another customer that wants XML, but wants it in a slightly different format, you can just create another XSLT for that customer. Then, in your database, keep track of which XSLT you need to load and use for that customer (or store the XSLT itself in the database).
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question