472,352 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

Java code to convert text files to xml

Is anyone aware of a Java program preferably w/ source code to convert
files in text format to xml format?
Pls. let me know if you are aware of such a program.
Jul 20 '05 #1
3 8940
In article <61**************************@posting.google.com >,
ro***@alum.rpi.edu (mave) wrote:
:Is anyone aware of a Java program preferably w/ source code to convert
:files in text format to xml format?
:
:
:Pls. let me know if you are aware of such a program.


Not likely, since the details of the text format and the desired XML
document structure are up to you. You just need to write something that
reads the text file, since you know its structure, and builds the XML
document the way you want it from the data, then writes it.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Jul 20 '05 #2
"Steve W. Jackson" <st***********@charter.net> wrote in message news:<st*********************************@news.fu-berlin.de>...
In article <61**************************@posting.google.com >,
ro***@alum.rpi.edu (mave) wrote:
:Is anyone aware of a Java program preferably w/ source code to convert
:files in text format to xml format?
:
:
:Pls. let me know if you are aware of such a program.


Not likely, since the details of the text format and the desired XML
document structure are up to you. You just need to write something that
reads the text file, since you know its structure, and builds the XML
document the way you want it from the data, then writes it.

= Steve =


Hi Steve,

Have you written something to build XML documents as you describe?

L
Jul 20 '05 #3
In article <f7*************************@posting.google.com> ,
lq****@univ.llu.edu wrote:
:"Steve W. Jackson" <st***********@charter.net> wrote in message
:news:<st*********************************@news.f u-berlin.de>...
:> In article <61**************************@posting.google.com >,
:> ro***@alum.rpi.edu (mave) wrote:
:>
:> >:Is anyone aware of a Java program preferably w/ source code to convert
:> >:files in text format to xml format?
:> >:
:> >:
:> >:Pls. let me know if you are aware of such a program.
:>
:> Not likely, since the details of the text format and the desired XML
:> document structure are up to you. You just need to write something that
:> reads the text file, since you know its structure, and builds the XML
:> document the way you want it from the data, then writes it.
:>
:> = Steve =
:
:Hi Steve,
:
:Have you written something to build XML documents as you describe?
:
:L


Not personally, but my coworker has done this. Our application does
high end modeling and simulation, using XML documents for the saved
model format. He worked on the previous incarnation of the application,
which used a completely different (pure text) file structure. So he put
together an "importer" that read the old file and put it into the
appropriate structure for our application.

It's just a matter of deciding what the structure of your XML document
should be and knowing what's in the text file. You create a new XML
document with appropriate code in Java, then add/manipulate elements and
attributes as needed to obtain the desired result.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Danny | last post by:
I am new to java/javascript. I wrote javascript to proces a cookie. I don't like that fact that the code is visible to all. Can I create a java...
0
by: Ray Tayek | last post by:
hi, trying to convert some csv files into xsml and pulling a few hairs out :(. using the files below. a java program will parse the csv and take...
0
by: Chua Wen Ching | last post by:
Hi there, I had downloaded the Java Language Conversion Assistant 2.0 from http://msdn.microsoft.com/vstudio/downloads/tools/jlca/. I had...
14
by: Mick | last post by:
I wrote a C# program that interfaces with a data vendor over the web using an API they supplied and their examples in C#. Now I have another data...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course...
10
by: Jay | last post by:
I've downloaded some Java files from the internet, and want to use them as a basis for a C# programme. They are .jar files, and when I open them...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no...
2
budigila
by: budigila | last post by:
Hiya peeps, Okies, I have been trying to work this out for a while now to no avail... I am a beginner to this whole coding thing but have made...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.