473,324 Members | 2,417 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,324 software developers and data experts.

Reading and writing files

i am naive with java programming. I would like create a program to read a set of text files, analyze them and create an output in an xml format or at least to another one txt file.

here is how one of the text file looks like:

[HTML]================================================== =======================
Date: Fri, 29 Sep 2006 10:20:31 -0400
Reply-To: linguist@LINGUISTLIST.ORG
Sender: The LINGUIST Discussion List <LINGUIST@LISTSERV.LINGUISTLIST.ORG>
From: LINGUIST Network <linguist@LINGUISTLIST.ORG>
Subject: 17.2819, Jobs: English, French & Comp Ling: Programmer,
Delphes Technologies
Comments: To: gayatri@linguistlist.org, linglike@linguistlist.org
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

LINGUIST List: Vol-17-2819. Fri Sep 29 2006. ISSN: 1068 - 4875.

Subject: 17.2819, Jobs: English, French & Comp Ling: Programmer, Delphes Technologies

Moderators: Anthony Aristar, Eastern Michigan U <aristar@linguistlist.org>
Helen Aristar-Dry, Eastern Michigan U <hdry@linguistlist.org>

Reviews: Laura Welcher, Rosetta Project / Long Now Foundation
<reviews@linguistlist.org>

Homepage: http://linguistlist.org/

The LINGUIST List is funded by Eastern Michigan University, Wayne
State University, and donations from subscribers and publishers.

Editor for this issue: Catherine Adams <catherin@linguistlist.org>
================================================== ============== [/HTML]

the equal marks signal a beginning and an ending of a single issue in the text files. I would like for example to seperate the subject, issue # ...etc and write them to an xml file or to another txt file could anyone help please?


Thank you so much in adance.
Oct 30 '07 #1
3 1523
r035198x
13,262 8TB
i am naive with java programming. I would like create a program to read a set of text files, analyze them and create an output in an xml format or at least to another one txt file.

here is how one of the text file looks like:

[HTML]================================================== =======================
Date: Fri, 29 Sep 2006 10:20:31 -0400
Reply-To: linguist@LINGUISTLIST.ORG
Sender: The LINGUIST Discussion List <LINGUIST@LISTSERV.LINGUISTLIST.ORG>
From: LINGUIST Network <linguist@LINGUISTLIST.ORG>
Subject: 17.2819, Jobs: English, French & Comp Ling: Programmer,
Delphes Technologies
Comments: To: gayatri@linguistlist.org, linglike@linguistlist.org
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

LINGUIST List: Vol-17-2819. Fri Sep 29 2006. ISSN: 1068 - 4875.

Subject: 17.2819, Jobs: English, French & Comp Ling: Programmer, Delphes Technologies

Moderators: Anthony Aristar, Eastern Michigan U <aristar@linguistlist.org>
Helen Aristar-Dry, Eastern Michigan U <hdry@linguistlist.org>

Reviews: Laura Welcher, Rosetta Project / Long Now Foundation
<reviews@linguistlist.org>

Homepage: http://linguistlist.org/

The LINGUIST List is funded by Eastern Michigan University, Wayne
State University, and donations from subscribers and publishers.

Editor for this issue: Catherine Adams <catherin@linguistlist.org>
================================================== ============== [/HTML]

the equal marks signal a beginning and an ending of a single issue in the text files. I would like for example to seperate the subject, issue # ...etc and write them to an xml file or to another txt file could anyone help please?


Thank you so much in adance.
1.) Use thread titles that describe your problem
2.) What have you done so far? Have you looked at the FileReader and or Scanner classes to see what file reading methods are available?
Oct 30 '07 #2
1.) Use thread titles that describe your problem
2.) What have you done so far? Have you looked at the FileReader and or Scanner classes to see what file reading methods are available?
No. Could you help please?
Oct 30 '07 #3
r035198x
13,262 8TB
No. Could you help please?
Read this thread, try some code on your own and post back if you get any problems.
Oct 30 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: dunnm | last post by:
This is probably a more appropriate location to post this question. I should have know that since I've found most of the other PHP/PDF information contained in this group. Here's my issue...I...
5
by: Benjamin de Waal | last post by:
Hey all, I'm trying to figure out how to directly write to a device in Windows. Basically, what I'm wanting to do is create an image of a device (specifically, a CompactFlash card that uses a...
2
by: John Salerno | last post by:
I wrote this code just to experiment with writing to and reading from a file. It seems to work fine when writing, but when reading the file, it only prints the filepath to the screen, not the file...
2
by: Robert Reijntjes | last post by:
Hi, I need to read/write data from/to binary files that have an already defined. This means I can't define classes with the attribute. The files also have arrays with variable length. This...
8
by: smeenehan | last post by:
This is a bit of a peculiar problem. First off, this relates to Python Challenge #12, so if you are attempting those and have yet to finish #12, as there are potential spoilers here. I have five...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
10
by: Tyler | last post by:
Hello All: After trying to find an open source alternative to Matlab (or IDL), I am currently getting acquainted with Python and, in particular SciPy, NumPy, and Matplotlib. While I await the...
7
by: random guy | last post by:
Hi, I'm writing a program which creates an index of text files. For each file it processes, the program records the start and end positions (as returned by tellg()) of sections of interest,...
2
by: Clive Green | last post by:
Hello peeps, I am using PHP 5.2.2 together with MP3_Id (a PEAR module for reading and writing MP3 tags). I have been using PHP on the command line (Mac OS X Unix shell, to be precise), and am...
0
Guido Geurs
by: Guido Geurs | last post by:
I'm writing a program that list the contents of a CDrom and also the contents of the ZIP files. When there is a bad Zip file on the CD, the program keeps traying to reed the file and after +- 50...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.