Solved

How to convert Flat files to XML

Posted on 2003-11-13
4
534 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
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XML Data Missing in PHP SimpleXML 8 62
XSL FO - text wrapping and empty spaces 1 35
XML XSLT If loop 4 26
XML Document XPath with Namespaces 3 22
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

777 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