Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Tool help for writing large amount of Java XML code?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have only written XML via Java code once, and with only seven elements that always had values, it was easy. Now I need to create an XML file for one of our vendors that must have 39 elements and sub-elements, with some of he data being blank. I have the data in a tab-delimited .txt file mostly. Is there any tool that will help me turn the tabbed fields into the appropriate XML without spending more time to set it up than brute force code to read each row of 39 tabbed item and wrap them in XML? Thanks.

Duncan
 
Saloon Keeper
Posts: 25463
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you could use an ETL tool such as Pentaho DI (Kettle). It allows you to define the input tab-separated data as a set of columns, then define XML output for those columns using a GUI-based editor (Spoon).

It's not a particularly difficult task to write a custom program to split tabs and emit XML, but the advantage of ETL tools is that they're designed to be used by non-programmers.
 
Marshal
Posts: 75648
354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question too difficult for “beginning”: moving to our XML forum.
 
He's giving us the slip! Quick! Grab this tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic