Solved

How to convert Flat files to XML

Posted on 2003-11-13
4
537 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 63 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 62 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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