Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML to database

 
Anna Anna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I need your help,I am having XML files that are coming from out side which will contain table data and I am parsing that XML file and able to extract that data using SAX parser.now I want to insert the data into the database maybe mysql or sqlserver.please can any body suggest me how to insert the data in to the data base.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"AnnaVA",
Please check your private messages regarding an important administrative matter.
-Ben
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anna,
You requested:

can anybody suggest how to insert the data into the database

Using an SQL "insert" statement?
Or is this a trick question?

Good Luck,
Avi.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you parsed the values, you can insert them into database, Now to do this DB operation through Java program, you need a complete information about JDBC connection , statements , result set. For that, I suggest you to look here !

This is what you want, else Please elaborate your query !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic