• Post Reply Bookmark Topic Watch Topic
  • New Topic

Interested in use XML to populate queries which are stored in Java objects which are serialized  RSS feed

 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to create a system which instead of create a Statement in SQL, uses Java classes. I mean create a java class which retrieves values from XML and generates the SQL dinamically.

Is that possible? What way could I do it?

Many Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possible? Sure, why not?

Your first step would be to learn how to parse XML to get the values needed.

Harold's free online book contains lots of examples.

Bill
 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill and others,

I already know what way do that but my doubt in more about what way create the object and serialize it, creating the query dinamically. It is a little mess for me.

Many Thanks
 
fred rosenberger
lowercase baba
Bartender
Posts: 12558
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as with all programming projects, you need to break it down into smaller parts. I see several:

1) create the object
2) serialize it
3) create the query

Each of these are separate, distinct problems. You shouldn't worry at all about #2 and #3 when working on #1. That makes the problems much more manageable.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!