Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JDBC, Xml and servlets

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
hi Gurus,
Thanks!! i think i got what i wanted...
Cheers
HArry
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!