• 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

JDBC, Xml and servlets

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i am just a starter . and i just wanna know how can i use xml, JDBC, and servlets together.. i mean can i use JDBC and XML together in a very effective manner... but thenwhat willbe the flow.. i am confused.. can anyone guide me through!!
harry
 
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harry,
What is it you are trying to do? Do you want to use a servlet to retrieve a result set into an xml file?
XML is not a kind of relational database, so there really is no JDBC driver for XML. However, XML does have something that works the similarly: SAX.
SAX is an event based API for xml.
The details of using the sax parser to extract data into an xml file are fairly lengthy but straightforward. If you're interested there is an article in JavaWorld which details exactly how to this.
Hope this helps!
[This message has been edited by Joe McGuire (edited June 13, 2001).]
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harjinder,
The question is not can you use this or that technology together, but rather is this technology a good approach to solving my problem.
What are you trying to accomplish? If we know that, we can suggest technology that is suited to your goal.
 
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If ur question is to combine all these technologies together, then here's the answer in breif.
First retrieve data from DBMS using JDBC and build a XML file using SAX or DOM API's. Then, use servlet to send this XML file to different server( XML is better chosen for EDI ie., in B2B scenario) and use parser at other side of server (use Servlet to get XML file over HTTP) to extract the XML file and update the database using JDBC.
Or else if u wanna send XML file to browser use some style sheets (XSL or CSS) to be displayed in browser as all browsers can't understand XML file, only IE(Internet Explorer) has built-in parser. U can use these style sheets at server-side or at client-side. there is a good explanation abt these XML/XSL forum.
HTH...
Anil
 
Harry Singh
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Gurus,
Thanks!! i think i got what i wanted...
Cheers
HArry
 
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic