Solved

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

Posted on 2009-04-02
1
964 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

829 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