• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create xml file from JDBC result set?

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the correct ways to do this? Which of the following is better?
(1) Use DOM to build a xml document and write to a file (or use this xml document in application)
(2) Use SAX to generate xml events and transform to a xml file
(3) Simply construct a big string from result set. (is this string really xml object?)
Thanks
Bruce
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I guess you should use option 2 since, DOM has a very huge memory foot print. Though u can use DOM parser to create the XML file provided the XML file to be created is small. DOM is much easier to understand and use...only problem is memory footprint.

Vivek V
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all plz., lemme know the database which u r using???
I think neither of ur ways is simple when compared with XSU.
XSU is an acronym for XML SQL UTILITY. This utility is much more flxible and simple to use as far as i am concerned..some may say its difficult but in fact its very simple once u understand it.
What is XSU??
XSU is a utility program from Oracle8 onwards and it automatically changes the result of a SQL query into XML document and an XML Document into an SQL query. U can make updations, deletions etc., with this utility directly.
Hope this information will help u a lot...
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic