This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Pipeline as Code and have Mohamed Labouardy on-line!
See this thread for details.
Win a copy of Pipeline as Code this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

How to retreivevalues from a table in Dbase and populate in a n XML file

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

Iam new to XML technologies. Iam basically JSP/servlets guy.
I just want your valuable guidance in a developing an application.

I just want to write a *.xml file populating it by values retrieved from database. I tried one exmple from IBM developerworks but then it writes out to console . This is done using DOM. But for my application i need this XML file so that i can club it with a corresponding XSL file and feed it to FOP that will result in XML-FO file which in turn gets converted into PDF.

Please let me know how to write this XML file with values from database.( I have the XML file with needed mapping as well that DOM makes use of.)It is pretty urgent.

Thanks a lot in advance.

Yours truly
T.Venkatesh
0091- 9845190631
Bangalore -India
 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
which version of database are you using?
Oracle 8i onwards supports fetching results in xml. similarily sql server (dont know which version since) also supports fetching results in xml.
You can get the xml and then pass it to xsl and then generate the pdf.

If your database doesnt support, then generate the xml dynamically and then give it to xsl for conversion.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Venkatesh Thiruvarul:


I just want to write a *.xml file populating it by values retrieved from database. I tried one exmple from IBM developerworks but then it writes out to console . This is done using DOM.

Yours truly
T.Venkatesh
0091- 9845190631
Bangalore -India


You can try to store the console output to a stringbuffer and then write it as an xml output file. IBM example is good.

BTW You don't need to give your telephone number and be more formal.. javaranch is friendly place for greenhorns
 
Oh. Hi guys! Look at this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic