473,474 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

xml to text file using java

9 New Member
hi folks,
I need to convert a xml file into a text file using core java..


thanks in advance...
plz reply to [email removed]
Feb 21 '07 #1
4 3611
dmjpro
2,476 Top Contributor
give me the xml file content ...

and what u want from it ....


i am online
Feb 21 '07 #2
vishwa040
9 New Member
give me the xml file content ...

and what u want from it ....


i am online
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE persons SYSTEM "http://mail.persistent.co.in/v1/addrbook.dtd">
<persons count="13">
<person ref="6024732a-1c38-102a-922a-0007e9315819">
<cn>Satish Agrawal</cn>
<category unfiled="yes">3</category>
<primaryphone>telephonenumber</primaryphone>
<uuid>6024732a-1c38-102a-922a-0007e9315819</uuid>
<lastmodtime>20060118T063535Z</lastmodtime>
<surname>Agrawal</surname>
<givenname>Satish</givenname>
<mail>satishgrawal@persistent.co.in</mail>
<telephonenumber primary="yes"/>
<nickname>satish</nickname>
<displayname>Satish Agrawal</displayname>
</person>
<person ref="0dbb27fa-20ed-102a-9922-0007e9315819">
<cn>Rahul Patil</cn>
<category unfiled="yes">3</category>
<primaryphone>telephonenumber</primaryphone>
<uuid>0dbb27fa-20ed-102a-9922-0007e9315819</uuid>
<lastmodtime>20060124T061900Z</lastmodtime>
<surname>Patil</surname>
<givenname>Rahul</givenname>
<mail>rahulptil@persistent.co.in</mail>
<telephonenumber primary="yes"/>
<nickname>rahul</nickname>
<displayname>Rahul Patil</displayname>
</person>
<person ref="d141cc6e-20fd-102a-8307-0007e9315819">
<cn>Milind Limaye</cn>
<category unfiled="yes">3</category>
<primaryphone>telephonenumber</primaryphone>
<uuid>d141cc6e-20fd-102a-8307-0007e9315819</uuid>
<lastmodtime>20060124T081900Z</lastmodtime>
<surname>Limaye</surname>
<givenname>Milind</givenname>
<mail>milindaye@persistent.co.in</mail>
<telephonenumber primary="yes"/>
<nickname>milind</nickname>
<displayname>Milind Limaye</displayname>
</person>
<person ref="b620b9c4-2669-102a-929b-0007e9315819">
<cn>prerana</cn>
<category>2</category>
<primaryphone>telephonenumber</primaryphone>
<uuid>b620b9c4-2669-102a-929b-0007e9315819</uuid>
<lastmodtime>20060131T055356Z</lastmodtime>
<surname>khare</surname>
<givenname>prerana</givenname>
<mail>preranhare@persistent.co.in</mail>
<telephonenumber primary="yes"/>
<nickname>prerana</nickname>
<displayname>prerana</displayname>
</person>
</persons>
And I want the outputs in following format (For each record ) :

And I want the outputs in following format (For each record ) :

Person 1:
Name : Satish Agrawal
Surname : Agrawal
and so on.....
Feb 21 '07 #3
dmjpro
2,476 Top Contributor
try to utilize the link ....

http://www.cafeconleche.org/books/xmljava/chapters/
if it helps u
Feb 21 '07 #4
r035198x
13,262 MVP
hi folks,
I need to convert a xml file into a text file using core java..


thanks in advance...
plz reply to [email removed]
You can use JAXP.
Feb 21 '07 #5

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

Similar topics

14
by: Michael Levin | last post by:
I've got the following problem. I'm a biologist and I have a device at work which monitors my frog habitat. The device has a bunch of sensors, and runs an embedded html server with some java...
10
by: Maurice Ling | last post by:
Hi, I'm a postgraduate and my project deals with a fair bit of text analysis. I'm looking for some libraries and tools that is geared towards text analysis (and text engineering). So far, the...
3
by: mave | last post by:
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.
4
by: Jean-Marie Delapierre | last post by:
Hi, I have two files in a directory. one called toto.txt with the following content : 1 2 3 4 5
10
blazedaces
by: blazedaces | last post by:
Alright guys, so the title explains exactly my goal. The truth is I'm going to be reading in a lot of data from an xml file. The file is too large and there's too much data to store in arraylists...
0
by: JosAH | last post by:
Greetings, the last two article parts described the design and implementation of the text Processor which spoonfeeds paragraphs of text to the LibraryBuilder. The latter object organizes, cleans...
14
jhardman
by: jhardman | last post by:
I am having a hard time opening a text file from an applet. I remembered after an attempt or two that there were obvious security issues here, so I switched the code to pull a text file off the...
7
by: Eric Wertman | last post by:
I have a set of files with this kind of content (it's dumped from WebSphere): ]
1
by: Achtland | last post by:
Hi all, I'm rather new to XSL (and this forum) and have searched everywhere to find out how to order the output of XML to text using XSLT but haven't found the answer. The XML is similar to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.