Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Java
xml to text file using java
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
vishwa040
New Member
Join Date:
Feb 2007
Posts:
9
#1
xml to text file using java
Feb 21 '07, 06:05 AM
hi folks,
I need to convert a xml file into a text file using core java..
thanks in advance...
plz reply to [email removed]
Last edited by
MMcCarthy
;
Feb 21 '07, 06:21 AM
.
Reason:
removing email address - against site rules
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#2
Feb 21 '07, 06:30 AM
give me the xml file content ...
and what u want from it ....
i am online
Comment
Post
Cancel
vishwa040
New Member
Join Date:
Feb 2007
Posts:
9
#3
Feb 21 '07, 06:34 AM
Originally posted by
dmjpro
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>t elephonenumber</primaryphone>
<uuid>6024732 a-1c38-102a-922a-0007e9315819</uuid>
<lastmodtime>20 060118T063535Z</lastmodtime>
<surname>Agrawa l</surname>
<givenname>Sati sh</givenname>
<mail>satishgra wal@persistent. co.in</mail>
<telephonenumbe r primary="yes"/>
<nickname>satis h</nickname>
<displayname>Sa tish Agrawal</displayname>
</person>
<person ref="0dbb27fa-20ed-102a-9922-0007e9315819">
<cn>Rahul Patil</cn>
<category unfiled="yes">3 </category>
<primaryphone>t elephonenumber</primaryphone>
<uuid>0dbb27f a-20ed-102a-9922-0007e9315819</uuid>
<lastmodtime>20 060124T061900Z</lastmodtime>
<surname>Pati l</surname>
<givenname>Rahu l</givenname>
<mail>rahulptil @persistent.co. in</mail>
<telephonenumbe r primary="yes"/>
<nickname>rahul </nickname>
<displayname>Ra hul Patil</displayname>
</person>
<person ref="d141cc6e-20fd-102a-8307-0007e9315819">
<cn>Milind Limaye</cn>
<category unfiled="yes">3 </category>
<primaryphone>t elephonenumber</primaryphone>
<uuid>d141cc6 e-20fd-102a-8307-0007e9315819</uuid>
<lastmodtime>20 060124T081900Z</lastmodtime>
<surname>Limaye </surname>
<givenname>Mili nd</givenname>
<mail>milindaye @persistent.co. in</mail>
<telephonenumbe r primary="yes"/>
<nickname>milin d</nickname>
<displayname>Mi lind Limaye</displayname>
</person>
<person ref="b620b9c4-2669-102a-929b-0007e9315819">
<cn>prerana</cn>
<category>2</category>
<primaryphone>t elephonenumber</primaryphone>
<uuid>b620b9c 4-2669-102a-929b-0007e9315819</uuid>
<lastmodtime>20 060131T055356Z</lastmodtime>
<surname>khar e</surname>
<givenname>prer ana</givenname>
<mail>preranhar e@persistent.co .in</mail>
<telephonenumbe r primary="yes"/>
<nickname>prera na</nickname>
<displayname>pr erana</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.....
Comment
Post
Cancel
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#4
Feb 21 '07, 06:46 AM
try to utilize the link ....
http://www.cafeconlech e.org/books/xmljava/chapters/
if it helps u
Comment
Post
Cancel
r035198x
MVP
Join Date:
Sep 2006
Posts:
13225
#5
Feb 21 '07, 10:14 AM
Originally posted by
vishwa040
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.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment