aspose file tools*
The moose likes XML and Related Technologies and the fly likes Convert XML into Word Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Convert XML into Word" Watch "Convert XML into Word" New topic
Author

Convert XML into Word

nagul samy
Ranch Hand

Joined: Feb 15, 2012
Posts: 37
Hi Team,

I need to convert an XML file into word file, but the XML tags keeps changing every time. Please let me know how should I proceed with java and XML programming.Please help.

Thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18989
    
    8

Well, you shouldn't. Proceed with programming, I mean. You haven't got your requirements clearly specified yet, so it's too early to start programming.

First you have to get your requirements clear. "Convert XML file to Word file" itself isn't clear -- there are many ways to do that. So you need to specify what it means to you to convert an XML file to a Word file. Other people may do it differently, but that's because their requirements are different than your requirements. You need to specify what YOU want to happen.

Once you have a complete set of requirements, you won't have a problem with unexpected XML tags. That's because your requirements will cover what to do for any tag. So get started with requirements definition.
nagul samy
Ranch Hand

Joined: Feb 15, 2012
Posts: 37
Hi Paul,

Thanks for your reply. My requirement is we have a XML file which has to be converted into doc file by extracting all the text content, in a simple way i need to extract all the text in XML and store it in a document with the same format. we have all the XML tag attribute details with us. Please help ?

Thanks.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
nagul samy wrote:but the XML tags keeps changing every time.


nagul samy wrote:we have all the XML tag attribute details with us.

Those two statements appear to contradict each other. You need to explain more clearly exactly what the problem is. Is it a general problem with reading XML files or a problem specific to the XML files you have ? Or is the problem with creating the Word document ?


Joanne
nagul samy
Ranch Hand

Joined: Feb 15, 2012
Posts: 37
Hi Joanne,

Thanks for your reply. The problem is creating word document from XML. I don't know how to proceed, Please advise.

Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
nagul samy wrote:The problem is creating word document from XML. I don't know how to proceed, Please advise.

I've never done it myself, but I believe that Apache POI is a commonly used API for creating Word documents in Java.
nagul samy
Ranch Hand

Joined: Feb 15, 2012
Posts: 37
Thanks Joanne. Is it possible to achieve it by OxygenXML developing tool ?
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
nagul samy wrote:Thanks Joanne. Is it possible to achieve it by OxygenXML developing tool ?

As I don't know your exact requirements and as it's possible to get a free trial of OxygenXML developer surely the best thing for you to do is try it out for yourself.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Convert XML into Word