?
Solved

How to convert Flat files to XML

Posted on 2003-11-13
4
Medium Priority
?
539 Views
Last Modified: 2012-06-21
HI,

I am in a situation to convert Flat files with XFlat schema to XML files without a converter. I need to write a one. Which language or technology would help me out to write that. Can u also suggest a good book on this.

Thanx,
0
Comment
Question by:subbiahm
[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
4 Comments
 
LVL 15

Accepted Solution

by:
dualsoul earned 252 total points
ID: 9745218
hm...what's this xFlat schema?
i think you can parse your flat file and generate SAXevents - so it will look like just a SAXParser parses simple xml. So you get xml on-the-fly from your text file. And then just save it.
   I think you can use any technology you like:
Java, COM the idea is very simple.
0
 
LVL 9

Assisted Solution

by:sparkplug
sparkplug earned 248 total points
ID: 9747799
Why not use XML Convert? http://www.unidex.com/overview.htm.

Alternatively, it is a relatively simple task to read a CSV file and convert to XML in any programming language (VB, Java, C++, C#). The language you use depends on your experience and the environment/platform you are working with.

An XML parser such as MSXML or Xerces would be useful for creating the XML output. If you need to read the XFlat schemas for information about the conversion you can either use a library such as http://www.cadenux.com/xflat/ or, as an XFlat schema is XML, you can read it using an XML parser and write your own code to interprete the informaton within.


>S'Plug<
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 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