Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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

XML file generation

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Can someone please help me with Apache Velocity package? For our webapplication we are required to generate to generate XML file for certain data. My senior developer suggested we use Apache's Velocity package to do so. Now i was trying to post few faqs on apache site but most links are broken so can some one please help me here.

First of all where do I place my template file in the webapp?

Any help or direction to working with Velocity would be greatful, also if you think there is better and easier way to generate xml files in java please do suggest.
Thanks in advance.
[ February 16, 2007: Message edited by: Romi Dave ]
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how about the JAX-B API. You have the schema with you now you can generate the XML document.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By any chance are you using Hibernate. If so you can map you classes also to XML and when you create a session you can set the session's EntityMode to the mode that can generate the XML. Kind of nice.

Mark
 
Romi Dave
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I am not using Hibernate. Basically my requirement is, I need to generate XML file for some data fields on my page and then that XML file would be used in other application.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could try http://xstream.codehaus.org/manual-tweaking-output.html
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I highly recommend using JDom then. It is easy to create an XML object with Java OO, then one command generates the XML from that object model of the xml.

Good Luck

Mark
 
You guys wanna see my fabulous new place? Or do you wanna look at 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