• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Question on Java Application Design

 
Greenhorn
Posts: 12
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,

i developed a utility jar which converts a proprietary XML file into an Excel file and vice verse. When i begun the development i was using a version 1.2 of that XML but now i'm told to make it compatible with the version 1.1.
the difference between both version is that one have different spelling for some tag or attributes and have some extra tags that the other don't have(and for which the utility was developed in the first place)
I used the sax parser for reading and DOM for writing data of the XML file.
also used the Jexcel API for Excel file.

Now i have to do some modification which i want it to have as little impact as possible on what we have now.

can anybody advise me on how to handle the desing for this utility to make it as generic as possible and if there's any design patterns which i can implement?

thank you
 
Ranch Hand
Posts: 96
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would go for additional XSLT step(s) to go from XML 1.2 to 1.1 or vice versa.

Wim
 
Sheriff
Posts: 22862
132
Eclipse IDE Spring TypeScript Quarkus Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For which you can use javax.xml.transform.Transformer:
reply
    Bookmark Topic Watch Topic
  • New Topic