Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now