473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 9011
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 application that resides on the server and call it...
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 care of strange names and notes that line breaks in...
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 installed it and it was suppose to integrate to...
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 vendor's API and example that I want to add to...
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 tutors are going to be teaching us JAVA wth bluej...
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 in Notepad, they are not text files. Is there...
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 driver found exception. to verify this error ive...
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 great strides in my project. Basically what I am...
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 java so that you can conceal sensitive information...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.