File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes How to use XML for desktop application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to use XML for desktop application?" Watch "How to use XML for desktop application?" New topic
Author

How to use XML for desktop application?

John Best
Greenhorn

Joined: Oct 02, 2011
Posts: 9
Dear friends,

Another one from me... a learner and user (to be) of XML

Say, I have CVs of various job applicants, with following format -

<cv>
<name>ABC</name>
<dob>03-Jan-1970</dob>
<state>CA</state>
<skills>Java, XML, Oracle, XQuery</skills>
<currentpost>Project Manager</currentpost>
<experience>
<post>Project Manager</post>
<company>Nokia</company>
<profile>Handling of projects. ......</profile>
<post>Project Leader</post>
<company>IBM</company>
<profile>Handling of projects. ......</profile>
</experience>
</cv>
<cv>
<name>PQR</name>
<dob>03-Dec-1971</dob>
<state>AB</state>
<skills>Java, XML, Oracle, XQuery, VB 2005, SQL-Server</skills>
<currentpost>Project Manager</currentpost>
<experience>
<post>Project Manager</post>
<company>XYZ Infotech</company>
<profile>Handling of projects. ......</profile>
<post>Project Leader</post>
<company>ABC Ltd</company>
<profile>Handling of projects. ......</profile>
</experience>
</cv>
.....
.....
.....

What should I use to display this XML file, as it will be displayed regularly in MS Word...?
I mean to format the this XML file what should I use..?

Also, if this has to be done with a desktop application...using JAVA..? then what...?



Have a nice day
John
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
The standard Java library provides plenty of tools for manipulating XML. You might want to get familiar with Harold's free online book to start with.

Formatting XML elegantly is the realm of XSLT.

Bill
John Best
Greenhorn

Joined: Oct 02, 2011
Posts: 9
Dear William,

Thanks a lot.
also for the answer and your site link... A very informative site...

Thanks a lot again...


Have a nice day
John
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

It seems like you are saying "I have this data, what should I use to display it?"

If it's a desktop application, and you want to write it in Java, then you should use Swing components to display it. It makes no difference whether your data is XML or a database or Windows INI files or whatever. Don't let the structure of the underlying data interfere with the way you want it displayed.
John Best
Greenhorn

Joined: Oct 02, 2011
Posts: 9
Dear Paul,

Paul Clapham wrote:It seems like you are saying "I have this data, what should I use to display it?"


I think, I gave my requirement in a wrong way. I will use Java swing for front-end, its sure. But the CVs
are in XML format and I want to display these CVs as if they are written in Word. For this, I will need
some kinda formatting to XML. I was asking for this... :)

Thanks a lot.. :)

Have a nice day
John
John Best
Greenhorn

Joined: Oct 02, 2011
Posts: 9
Dear Paul,

One more. ... in continuation of the CV project...

Say, I have 3000 CVs, then to read, search them... which one will be better, SAX or DOM...?


Thanks in advance..

Have a nice day
John
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

DOM will be better because it will be much easier for you to do the programming.
John Best
Greenhorn

Joined: Oct 02, 2011
Posts: 9
Paul Clapham wrote:DOM will be better because it will be much easier for you to do the programming.


Dear Paul,


Thanks a lot ... :)



have a nice day
John
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to use XML for desktop application?
 
Similar Threads
(8-12 Yrs Exp) Required - Product Development Manager
Immediate Chennai based Java/J2EE SE/TL/PM Openings in DCKAP, Sysbiz & Satyam
(6-9 Yrs Exp) Required-Principal/Senior Engineer(Microsoft Technologist)
(8-12 Yrs Exp) Required - Product Development Manager
(1-3 Yrs Exp)Required-Associate Product Development Engineer-MS Technologies